Zodiac sign in Postbit and Profile - plugin?
#1
Hey guys,

Just wondering if you know about a plugin for 1.8.22 for calculating and displaying a zodiac sign (from users birthday) in the Postbit and Profile?

I found this old (1.4) one for displaying in Postbit by LeX but it doesn't work with 1.8.22 (after changing the compatibility). Probably needs a few tweaks to make it work properly. Can you help? Angel


Kind regards,

Jason


Attached Files
.zip   Zodiaque dans les messages v.2.0.Fr-Us (MyBB 1.4.x).zip (Size: 23.85 KB / Downloads: 15)
Reply
#2
In the plugin file find:
"isdefault"		=> "no",

Replace to:
"isdefault"		=> 0,

Does it work or what errors you notice?
Reply
#3
Hi Omar,

Tried that change but still nothing displays in the postbit template. As if the plugin was not installed! Sad


Kind regards,

Jason
Reply
#4
I see, make sure {$post['zodiac']} is within your postbit and postbit_classic templates. Then open the file and find:
function zip($post)

And replace with:
function zip(&$post)
Reply
#5
Thanks so much Omar,

You're a star... it's working now! Big Grin

Is there a way to still display the zodiac even if the user has set their birthday as hidden?


Kind regards,

Jason

Don't worry about my last request - I've got it working now! Smile Was just some missing birthday info!

Would there be an easy way to include {$post['zodiac']} in member profiles or would it be too complicated?


Kind regards,

Jason
Reply
#6
Instead of the above open the file and find:
function zip($post)
{

And replace with:
$plugins->add_hook('member_profile_end', 'zip');
function zip(&$post)
{
	global $db, $mybb, $lang, $memprofile;

	if(THIS_SCRIPT == 'member.php')
	{
		$post = &$memprofile;
	}

Then in your member_profile template paste {$memprofile['zodiac']}.
Reply
#7
That worked! Big Grin Thanks for all your help Omar!

[Image: giphy.gif?cid=ecf05e4787c822e420cd0dc9d9...=giphy.gif]
Reply


Forum Jump:


Users browsing this thread: 3 Guest(s)