Get XOOPS XOOPSXOOPS FAQFAQ ForumsForums NewsNews ThemesThemes ModulesModules
News World of XOOPS Developers Hacks Modules Themes YAXS Archive Submit News

Search

Donat-O-Meter

Make donations with PayPal!
Stats
Goal: $100.00
Due Date: May 31
Gross Amount: $65.00
Net Balance: $61.80
Left to go: $38.20

Donations
studioC  ($25)May-17
Anonymous ($15)May-16
Anonymous ($25)May-4

Learn XOOPS Core

Local Support

Advertisement

XOOPS Code hosted on SourceForge

Cumulus Tag Cloud

2 2.5 2.6 3.0 2013 Abuse adslight AntiHarvesting AntiMalUser AntiSpam API Australia Ban banner Beats billige black Blocks blue Captcha cell Christmas chronolabs content Conversion database demo docek download Dresses editor evden eve facebook floor free Google herre Honeypot Human IP jQuery kantor lamps Legal log logger Logging mobile module modules Monster MyAlbum-p Networks newbb news Notices online PageRank pdf Permissions pink Plugin portal Prevention profile project Protector publisher release Rights rmcommon Room sale security SERIAL Server site Smarty Spam statistics stem Studio tag tags tdmcreate template Theme themes userlog website Whitepaper XML XooLaT xoops Xoopspoll Xortify xthemes Yolande ZendFramework

New Users

Registering user

# 136010

nht2007

Welcome to XOOPS!

Archives

News Archives

xNews 1.68 UTF-8 CLonable & SEO **** BETA ****

Posted by dnprossi on 2010/3/24 12:00:00 (4303 reads) | Posted on Modules
In less than a month already 90 downloads *** Thanks ***

On request I decided to add SEO functionality to xNews. I made it 1.68 Beta.

Here is a short help explaining how to update original and upgrade clones.

The original xNews module is the Main Manager for cloning, uprading and removing cloned modules. And in case of version updates it must be the first one to be updated.

For example: you now have "xNews" original plus "Library" and "Info" clones v 1.67
you get xNews v 1.68 and overwrite xNews 1.67 ( *** original xNews only!!! ***) with new files. You can update from xNews admin Clone Manager or directly from Modules Admin. Once updated you will see that in Clone Manager the clones in the list will have Upgrade ACTION active now. Click on each, one at a time to upgrade them to new verison then go to Modules Admin and update them normally.

Now all your clones are ready to work with the new 1.68 version.

I have added a Topics Display enable/disable preferences option. In case of an info clone where I can add general infomation to the site I did not want topic selection and navigation to be viewed.

On request I added SEO functionality to xNews. No installation is needed. Everything is controlled by new SEO Enable module preferences settings. yes/enabled no/disabled.

Everything works from xnews or cloned module dirs not from root so you can have one clone seo and others not.

To get SEO working be sure that server is mod-rewrite enabled and symlinks are correctly configured.
Controll if .htaccess file has been copied during upgrade. If not get the one in seo folder and copy it from htaccess.txt to .htaccess in modules/xnews modules/clone dirs

I use xlanguage alot and use function.xoLanguage.php in xoops/class/smarty/xoops_plugins so to have my language controls where i want on my themes, i modified it to work with SEO urls reparsing them to normal when needed. I included these file with xNews module.

I want to thank all who are translating xNews, I will add all languages when major changes will come to an end and we have a stable realease (have not added my italian translation either yet). In the meantime Thank you all again.

**** Thanks to voltan for his new nifty admin/index interface included now in 1.68.

ENJOY!!

- Added SEO
- preferences Seo Enable config option
- htaccess in modules/xnews folder
- seo.php in modules/xnews
- function.xoLanguage.php in xoops/class/smarty/xoops_plugins
- xoSmartyFunctions.php in xoops/Frameworks/smarty
- Added new admin/index interface by voltan (thank you!)
- Added new config option in module preferences Dispay topics title yes no this will hide topics
from header title and also disable topic image clicking.
- Language file changes
main.php
changed define("_AM_NW_GROUPPERM", "Permissions");
added define("_MA_NW_SP", ":");
added define("_MA_NW_POSTED", "Posted");
modinfo.php
added define("_MI_NW_TOPICDISPLAY", "Display Topics");
added define("_MI_NW_TOPICDISPLAYDESC", "This will enable/disable Topics title in block headers");
added define("_MI_NW_SEOENABLE", "SEO enable");
added define("_MI_NW_SEOENABLEDESC", "This will enable/disable SEO activity");
- Fixed item width to 100% when short scoop and extended item block shrunk on some themes
- Fixed topic image alignment
- Many other small fixes

You can download xNews 1.68 beta here


Printer Friendly Page Send this Story to a Friend Create a PDF from the article
Bookmark Me
Bookmark to Google Plus
The comments are owned by the author. We aren't responsible for their content.

Thanx! It is very-very good news!!
Published: 2010/3/24 13:31 • Updated: 2010/3/24 13:31
This is more that good news. This is great news! :D

One more feature request. Could you make possible topics to have sorting function like weight feature?

Tnx!
Published: 2010/3/24 14:08 • Updated: 2010/3/24 14:08
what is the url gonna be like ? any demo ?


thank you for this

will download this weekend...sf is block at my office
Published: 2010/3/24 17:22 • Updated: 2010/3/24 17:22
thank you for new version !
it possible to add multi categories in future ?
Published: 2010/3/25 0:33 • Updated: 2010/3/25 0:33
Sorry to all I have just updated the download file because of a silly bug.

- Fixed bug when topics are empty and "Author's name" in preferences is set to "Do not display author"

For those who already updated xnews to v.168 beta and upgraded clones line 332 must be corrected in xnews/index.php file and every other clone. Do not copy xnews/index.php to clones please, change the line in each one separately.

from
if ( $thisstory->uname() != '' )

to
if ( $story['poster'] != '' )


Sorry for that!!!
Published: 2010/3/25 4:22 • Updated: 2010/3/25 4:22
URL change...

http://www.myhome.com/modules/news/article.php?storyid=200


becomes

http://www.myhome.com/articles.item.200/title-of-the-story.html

Published: 2010/3/25 4:34 • Updated: 2010/3/25 4:35
it do not suppoert persian/arabic language

for example :

english :
http://localhost/local/test/svn/modules/xnews/articles.item.3/asdasdas.html

http://localhost/local/test/svn/modules/xnews/articles.cat.1/xoops.html


persian/arabic :
http://localhost/local/test/svn/modules/xnews/articles.cat.2/.html

http://localhost/local/test/svn/modules/xnews/articles.item.2/.html



---------------------------------------------
and I have blank page in pdf factory
Published: 2010/3/25 5:43 • Updated: 2010/3/25 5:45
Hi voltan,
Yes non western chars in urls are an issue and I am trying to find a clean solution for them.

I am looking at utf-8 url conversion code but have not found something to adapt yet.

Any sugestions???
Published: 2010/3/25 6:18 • Updated: 2010/3/25 6:18
looking to the wordpress !
Published: 2010/3/25 7:24 • Updated: 2010/3/25 7:24
Quote:
I am looking at utf-8 url conversion code but have not found something to adapt yet.


Website-Baker also has a nice conversion solution for that .... it's somewhere in their forums (works great for Hebrew)

And - yes - Wordpress's "slug" is simple and heandy solution (no conversions needed)
Published: 2010/3/25 20:07 • Updated: 2010/3/25 20:07
Hi DNSProsi,

thank you for continuing this module

1. Hope the URL will be much nicer something like this
http://www.xoops.org/modules/news/article.php?storyid=4571

2. Is it possible to have close for comment feature...not all article i want my user to comment

Thnak you once again
Published: 2010/3/25 21:12 • Updated: 2010/3/25 21:12
All languages are working now!!!!

Fixed it... Updated download!!!

Here is the code to replace in xnews/include/functions.php and clone/include/functions.php for those who already installed non working one.

Please replace code in functions.php from line 702 to end of function do not replace } end of function.

/**
    * if XOOPS ML is present, let's sanitize the title with the current language
    */
    
$myts MyTextSanitizer::getInstance();
    if (
method_exists($myts'formatForML')) {
        
$chain $myts->formatForML($chain);
    }
    
    
/**
    * if xLanguage is present, let's prepare the title with the current language
    */
    
$module_handler =& xoops_gethandler('module');
    
$xlanguage $module_handler->getByDirname('xlanguage');
    if ( 
is_object($xlanguage) && $xlanguage->getVar('isactive') == true 
    { 
        require_once 
XOOPS_ROOT_PATH.'/modules/xlanguage/include/functions.php';
        
$chain xlanguage_ml($chain); 
    }     
    
    
$chain rawurlencode($chain);
    
$chain utf8_decode($chain);

    
// Transform punctuation
    //                 Tab     Space      !        "        #        %        &        '        (        )        ,        /        :        ;        <        =        >        ?        @        [                ]        ^        {        |        }        ~       .
    
$pattern = array("/%09/""/%20/""/%21/""/%22/""/%23/""/%25/""/%26/""/%27/""/%28/""/%29/""/%2C/""/%2F/""/%3A/""/%3B/""/%3C/""/%3D/""/%3E/""/%3F/""/%40/""/%5B/""/%5C/""/%5D/""/%5E/""/%7B/""/%7C/""/%7D/""/%7E/""/./");
    
$rep_pat = array(  "-"  ,   "-"  ,   ""   ,   ""   ,   ""   "-100" ,   ""   ,   "-"  ,   ""   ,   ""   ,   ""   ,   "-"  ,   ""   ,   ""   ,   ""   ,   "-"  ,   ""   ,   ""   "-at-" ,   ""   ,   "-"   ,  ""   ,   "-"  ,   ""   ,   "-"  ,   ""   ,   "-"  ,  ""  );
    
$chain   preg_replace($pattern$rep_pat$chain);
    
    
$chain .= '.html';
    return 
$chain;

Published: 2010/3/26 4:11 • Updated: 2010/3/26 4:11
Thanks for your nice work.

In Persian language pdf not work well, generate ??? for all characters of story articles.
Published: 2010/4/3 7:46 • Updated: 2010/4/3 7:46
Working great with cyrilic.

But, it would be nice instead of keywords field (keywords is obsolete) to inculde option for custom url rewrite name like in SmartSection or Publisher?

Beside the working stuff, I got this error:
NoticeUndefined indexlang in C:Program FilesEasyPHP5.3.0wwwmodulesxnewsseo.php on line 13


One more SEO suggestion. Is is possible SEF urls to be xoopssite.com/modules/xnews/categoryname/articlename.html?

Then in with url rewrite we could get xoopssite.com/sitenewsorsomething/categoryname/articlename.html

...and option to disable 'categoryname' in SEF url rewrite to be just xnews/articlename.html?

BTW. What about option for topic weight position? :)

I really admire your work! Keep doing a good job!
Published: 2010/4/3 13:38 • Updated: 2010/4/3 13:48
In feature you want add this new works in news module or development xnews ?

I hop you add all new features in news and public new version for XOOPS 2.5
Published: 2010/4/4 0:10 • Updated: 2010/4/4 0:10
Hi voltan,
xNews is the news module. I did not call it news because of import functionality and cloning problems with the news word that is repeatedly used in code and should not be parsed by cloner. Plus you can keep the original news module as any other clone (no need to remove it).
Published: 2010/4/4 3:13 • Updated: 2010/4/4 3:13
Hi mojtabajml,

makepdf and tcpdf are not automatically configured for all languages there are some changes to be made to modules/xnews/makepdf.php and xoopsroot/languages/persian/global.php file so it works for persian chars.

Here is a link to tcpdf PDF example with persian language

and here is the php code used to generate the page.

hope it helps...

here are some details:

in xoopsroot/languages/persian/global.php you should have

//%%%%%        LANGUAGE SPECIFIC SETTINGS   %%%%%

define('_CHARSET''utf-8');

define('_LANGCODE''fa');

// change 0 to 1 if this language is a multi-bytes language

define('XOOPS_USE_MULTIBYTES''1');


and you could try to add right after:

//DNPROSSI ADDED gbsn00lp chinese to tcpdf fonts dir
if (_LANGCODE == "cn") { $pdf->SetFont('gbsn00lp'''10); }


if (_LANGCODE == "fa") {
    
// RTL direction for persian language
    
$pdf->setRTL(true);
    
$pdf->SetFont('almohanad'''18);
}

Published: 2010/4/4 3:44 • Updated: 2010/4/4 3:44
Ok, thanks

for Persian pdf must be set :
if (_LANGCODE == "fa") {
    
// RTL direction for persian language
    
$pdf->setRTL(true);
    
$pdf->SetFont('dejavusans'''18);
}

Published: 2010/4/4 7:59 • Updated: 2010/4/4 7:59
Hi.. could you please add larger field for entering meta description?

Like:
in include/storyform.inc.php line 111:
$sform->addElement(new xoopsFormTextArea(_MA_NW_META_DESCRIPTION, 'description', $description, 3, 60), false);

Tnx :)
Published: 2010/4/8 9:11 • Updated: 2010/4/8 9:11
friends xoops.org such mounting procedures have Xnews on my website and I mark the following error

Parse error: syntax error, unexpected T_VARIABLE in / home/cyberm05/public_html/modules/xnews/seo.php on line 4

I would like to know this error refers Achaeans as they do not show me the news I post on my website, however if the news if paracer disable SEO

I hope I can help and thanks in advance saldudos
Published: 2010/5/17 13:23 • Updated: 2010/5/17 13:23