Mind blowing SEO improving and Google rank increasing Signature Rotator SEO Tool.

Thread: 

Help with template conditionals code

Ads
banner
banner
banner
MikeInToshx Offline referral

Posts: 27
Joined: Jan 2014
Reputation: 1

#1
Junior Member
Hey guys,

What PHP code do I use if I want to make an infobar in this forum?:
http://computerhelpforum.be/forum-handle...ips-tricks

Only visible in that forum, not somewhere else.

PHP Code:
<if "user in this forum"' then>

<div>...</div>

</if> 

I don't know any PHP Blush

Cheers.
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#2
Senior Member
I have mybb forum script and I can help you! Whats the forum fid?
MikeInToshx Offline referral

Posts: 27
Joined: Jan 2014
Reputation: 1

#3
Junior Member
Hi,

Tbh I have no idea :/ I'm using Google SEO links :/


fid=47
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#4
Senior Member
Let see if I understand! You wan to hide this message across the entire board but make it visible only in some X forum?
MikeInToshx Offline referral

Posts: 27
Joined: Jan 2014
Reputation: 1

#5
Junior Member
Yep that is correct.

I want to display an infobar in the tutorials-section.
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#6
Senior Member
Add this code to your forumdisplay template! Inside the template find: {$header} and add this code under it!

PHP Code:
<if $GLOBALS['fid'] != 47  then><else>
// Your code goes here
<div style="clear: both;"/>
</if> 
MikeInToshx Offline referral

Posts: 27
Joined: Jan 2014
Reputation: 1

#7
Junior Member
Thankyou so much, worked Smile

The closing tag went wrong though, changed it to </div style="clear: both;"> and worked.

I might want to greet them aswell, so like:

Hi, "username", ... What code displays their username? Big Grin
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#8
Senior Member
NP glad it works see ya Wink

Hold on

{$mybb->user['username']} should return username Wink

P.S. make it pretty add margin-bottom: 20px; or so Wink
MikeInToshx Offline referral

Posts: 27
Joined: Jan 2014
Reputation: 1

#9
Junior Member
Awsome Smile Thanks again.

Yeah just made it 15px Tongue
marcus_avrelius Offline referral

Posts: 2,424
Joined: May 2013
Reputation: 102

#10
Support Team
Great reply SEO123!
If you wish to show this message in more than one forum then add an extra conditional expression

Code:
<elseif $GLOBALS['fid'] != X then>

Let just say you also want this message to show in forum fid50

PHP Code:
<if $GLOBALS['fid'] != 47  then><elseif $GLOBALS['fid'] != 50 then><else>
// Your code goes here
<div style="clear: both;"/>
</if> 
MikeInToshx Offline referral

Posts: 27
Joined: Jan 2014
Reputation: 1

#11
Junior Member
Ok thanks, I'll go back to this thread if I need it Smile
seo123 Offline referral

Posts: 427
Joined: Mar 2014
Reputation: 16

#12
Senior Member
(03-15-2014 11:33 PM)MikeInToshx Wrote:  Awsome Smile Thanks again.

Yeah just made it 15px Tongue

Cool if you need more conditionals please feel free to ask Smile

Edit: Looks great
MikeInToshx Offline referral

Posts: 27
Joined: Jan 2014
Reputation: 1

#13
Junior Member
I sure will Wink

Thanks.





User(s) browsing this thread: 1 Guest(s)