MyBB Community Forums

Full Version: Zodiac sign in Postbit and Profile - plugin?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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
In the plugin file find:
"isdefault"		=> "no",

Replace to:
"isdefault"		=> 0,

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

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


Kind regards,

Jason
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)
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
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']}.
That worked! Big Grin Thanks for all your help Omar!

[Image: giphy.gif?cid=ecf05e4787c822e420cd0dc9d9...=giphy.gif]
Hello Omar!

I love this plugin but sadly it's incompatible with MyBB 1.8.34 
is it possible to make some changes so it works with the new MyBB version?

Thanks a lot in advance
Karin