1
wizanda
Plan on how to merge 2.2 and 2.0
  • 2007/10/26 9:21

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Considering most modules install ok on 2.2.5Z, it is only a few bits we need too join to together…why so many of you are constantly talking backwards…Is beyond me and not productive….
Most people go forwards and not backwards, else we will end up with more errors, not less….Plus loose all the work people have done…..

We agree on that we want these same features now in 2.2.5 along time ago and again within the pointless documentation on our Sourceforge Wiki…..Plus constant requests by new users for these same things…

The points in question for all:

One of the main reasons modules don’t work from my own assessments of modules that don’t function correctly, is due to the user settings…

In the older copy (2.0) there is a clear indication of what the user var’s are for IM systems, url in the userinfo.php…..In the new version these are collected as they can be changed….
So is it possible to make it that within 2.2.5, there is an old function call, if these exist, then assign those as we use too….If not then place a blank for each of them…??
If that works then older modules would still function correctly, as most of the time they only don’t work on this point…..

2
kaotik
Re: Plan on how to merge 2.2 and 2.0
  • 2007/10/26 9:26

  • kaotik

  • Just can't stay away

  • Posts: 861

  • Since: 2004/2/19


I totally agree with you
www.kaotik.biz

3
wizanda
Re: Plan on how to merge 2.2 and 2.0
  • 2007/10/26 10:21

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


userinfo.php
$thisUser =& $xoopsUser;
$xoopsTpl->assign('lang_allaboutuser'sprintf(_US_ALLABOUT,$thisUser->getVar('uname')));
$xoopsTpl->assign('lang_avatar'_US_AVATAR);
$xoopsTpl->assign('user_avatarurl''uploads/'.$thisUser->getVar('user_avatar'));
$xoopsTpl->assign('lang_realname'_US_REALNAME);
$xoopsTpl->assign('user_realname'$thisUser->getVar('name'));
$xoopsTpl->assign('lang_website'_US_WEBSITE);
$xoopsTpl->assign('user_websiteurl''<a href="'.$thisUser->getVar('url''E').'" target="_blank">'.$thisUser->getVar('url').'</a>');
$xoopsTpl->assign('lang_email'_US_EMAIL);
$xoopsTpl->assign('lang_privmsg'_US_PM);
$xoopsTpl->assign('lang_icq'_US_ICQ);
$xoopsTpl->assign('user_icq'$thisUser->getVar('user_icq'));
$xoopsTpl->assign('lang_aim'_US_AIM);
$xoopsTpl->assign('user_aim'$thisUser->getVar('user_aim'));
$xoopsTpl->assign('lang_yim'_US_YIM);
$xoopsTpl->assign('user_yim'$thisUser->getVar('user_yim'));
$xoopsTpl->assign('lang_msnm'_US_MSNM);
$xoopsTpl->assign('user_msnm'$thisUser->getVar('user_msnm'));
$xoopsTpl->assign('lang_location'_US_LOCATION);
$xoopsTpl->assign('user_location'$thisUser->getVar('user_from'));
$xoopsTpl->assign('lang_occupation'_US_OCCUPATION);
$xoopsTpl->assign('user_occupation'$thisUser->getVar('user_occ'));
$xoopsTpl->assign('lang_interest'_US_INTEREST);
$xoopsTpl->assign('user_interest'$thisUser->getVar('user_intrest'));
$xoopsTpl->assign('lang_extrainfo'_US_EXTRAINFO); $var $thisUser->getVar('bio''N');
$xoopsTpl->assign('lang_statistics'_US_STATISTICS);
$xoopsTpl->assign('lang_membersince'_US_MEMBERSINCE);
$var $thisUser->getVar('user_regdate');
$xoopsTpl->assign('user_joindate'formatTimestamp($var's'));
$xoopsTpl->assign('lang_rank'_US_RANK);
$xoopsTpl->assign('lang_posts'_US_POSTS);
$xoopsTpl->assign('lang_basicInfo'_US_BASICINFO);
$xoopsTpl->assign('lang_more'_US_MOREABOUT);
$xoopsTpl->assign('lang_myinfo'_US_MYINFO);
$xoopsTpl->assign('user_posts'$thisUser->getVar('posts'));
$xoopsTpl->assign('lang_lastlogin'_US_LASTLOGIN);

language/english/user.php
//%%%%%%File Name userinfo.php%%%%%
define('_US_NICKNAME','Username');
define('_US_REALNAME','Real Name');
define('_US_EMAIL','Email');
define('_US_PM','PM');
define('_US_ICQ','ICQ');
define('_US_AIM','AIM');
define('_US_YIM','YIM');
define('_US_MSNM','MSNM');
define('_US_WEBSITE','Website');
define('_US_LOCATION','Location');
define('_US_OCCUPATION','Occupation');
define('_US_INTEREST','Interest');
define('_US_SIGNATURE','Signature');
define('_US_EXTRAINFO','Extra Info');
define('_US_EDITPROFILE','Edit Profile');
define('_US_MEMBERSINCE','Member Since');
define('_US_RANK','Rank');
define('_US_POSTS','Comments/Posts');
define('_US_LASTLOGIN','Last Login');
define('_US_ALLABOUT','All about %s');
define('_US_STATISTICS','Statistics');
define('_US_MYINFO','My Info');
define('_US_BASICINFO','Basic information');
define('_US_MOREABOUT','More About Me');
define('_US_SHOWALL','Show All');


Works for Yogurt..... ...some of them may not be needed....next job $xoTheme = old theme functions??....

4
wizanda
Re: Plan on how to merge 2.2 and 2.0
  • 2007/10/29 10:49

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Ok maybe you don’t need to change the userinfo.php, as they messed up the new profiles….yet since I changed that back yesterday on realizing and then today I still had Yogurt still installed on my home PC, with xoops_module_header in exchange for the $xoTheme->addstylesheet……..
Then on going to it, it still works….other then the user language files, which within the profiles module have been defined with PROFILE_ in front….so on adding the language alone in the language/../user.php this then works……

So we need to add $xotheme back into XOOPS 2.2 so that isn’t comprised….as it is far better system then Xoops_module_header….

5
tzvook
Re: Plan on how to merge 2.2 and 2.0
  • 2008/7/27 12:50

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2


@ wizanda
I understand that you made Yogurt function with the 2.2.x series.
I had a few fights with the $xotheme staff, and had no success .... can you post the hack please ? I have 4 2.2.x sites which I can't upgrade to 2.3 and Yogurt will be a great addition.

6
wizanda
Re: Plan on how to merge 2.2 and 2.0
  • 2008/7/27 13:46

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


It needed the userinfo.php language files added to the user.php in languages.
//%%%%%%File Name userinfo.php%%%%%
define('_US_NICKNAME','Username');
define('_US_REALNAME','Real Name');
define('_US_EMAIL','Email');
define('_US_PM','PM');
define('_US_ICQ','ICQ');
define('_US_AIM','AIM');
define('_US_YIM','YIM');
define('_US_MSNM','MSNM');
define('_US_WEBSITE','Website');
define('_US_LOCATION','Location');
define('_US_OCCUPATION','Occupation');
define('_US_INTEREST','Interest');
define('_US_SIGNATURE','Signature');
define('_US_EXTRAINFO','Extra Info');
define('_US_EDITPROFILE','Edit Profile');
define('_US_MEMBERSINCE','Member Since');
define('_US_RANK','Rank');
define('_US_POSTS','Comments/Posts');
define('_US_LASTLOGIN','Last Login');
define('_US_ALLABOUT','All about %s');
define('_US_STATISTICS','Statistics');
define('_US_MYINFO','My Info');
define('_US_BASICINFO','Basic information');
define('_US_MOREABOUT','More About Me');
define('_US_SHOWALL','Show All');

Then to fix the header we can either use:
$xoopsOption['xoops_module_header'] = '<link rel="stylesheet" type="text/css" href="'.XOOPS_URL.'/modules/yogurt/templates/style.css" />';
$xoopsOption['xoops_module_header'] .= ‘all items needed’;

The other is:
$xTheme->addCSS(
$xTheme->addJS(

Just replace the $xoTheme, for $xTheme and use these methods to include it exactly the same.

7
tzvook
Re: Plan on how to merge 2.2 and 2.0
  • 2008/7/27 14:24

  • tzvook

  • Just can't stay away

  • Posts: 875

  • Since: 2003/2/1 2



The smile on my face is much much much wider
Thanks !!! you made my day !!!!!!!

( I tried replacing $xoTheme->addScript with $xTheme->addScript .... stupid me )

8
wizanda
Re: Plan on how to merge 2.2 and 2.0
  • 2008/7/27 15:19

  • wizanda

  • Home away from home

  • Posts: 1585

  • Since: 2004/3/21


Since on topic of merge sorry this wasn't earlier, yet had a think about it and here is a better way for future compatibility :
common.php
$xTheme = new XTheme($xoopsConfig['banners'] == 1in_array(3$xoopsConfig['debug_mode']));
<--------------------------
add below here
$xoTheme 
=& $xTheme;

That for our $xoTheme object....Next in class/theme.php somewhere within the class xTheme:
/* added for compatibility */
function addStylesheet($src ''$attributes = array(), $content ''){$XaddStyle $this->addCSS($src,$attributes,$content);
return 
$XaddStyle;}
function 
addScript($src ''$attributes = array(), $content ''){$XaddScript $this->addJS($src,$attributes,$content);
return 
$XaddScript;}

Then that's to redirect all references automatically to the other version doing the exact same thing

Login

Who's Online

215 user(s) are online (67 user(s) are browsing Support Forums)


Members: 0


Guests: 215


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits