vBulletin Modifications

Need to create a condition...

Welcome to vBHackers.com! - vBHackers Updates:

Go Back   vBulletin Modifications > General vBulletin Section > General vBulletin Support

Reply
 
LinkBack Thread Tools
Old 08-30-2006, 07:22 AM   #1
vB User
Join Date: Aug 2006
Real Name: Samantha
Samantha is on a distinguished road

Default Need to create a condition...

Hello guys, I was trying to edit some of my templates to make my forum unique but I am not very good in php yet. I got a question for you: I need to create a condition in which i must specify if the variable $forum[moderators] is empty or not...

Example:

You must first be a registered member to view any code.

Can someone help please?


Kindest Regards
Samantha




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
Old 08-30-2006, 03:53 PM   #2
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

Default

well, i'm not sure/recall about any "direct" moderator number info exists inside $forums[] array, but you could simply gather number of moderators, by add into related hook code like this:

You must first be a registered member to view any code.
then inside your template:
You must first be a registered member to view any code.
hope this helps.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-30-2006, 05:44 PM   #3
vB User
Join Date: Aug 2006
Real Name: Samantha
Samantha is on a distinguished road

Default

Quote:
Originally Posted by Idan
You must first be a registered member to view any code.
First of all thanks for your time, I don't have a hook code...all I am doing is editing some templates. So where am I supposed to use the quoted code?


Thank you!

Kisses
Samantha




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-30-2006, 05:56 PM   #4
Coder
Idan's Avatar
Join Date: Feb 2005
Real Name: Idan
Location: Israel
Idan is on a distinguished road

Default

what vbulletin version are you using ? 3.0.xx ? or 3.5.x/3.6.x ??
the answer & code mentioned to be placed @ hook system assumed you were using 3.5.x version or higher.
if answer is 3.0.xx, then just put php code into either showthread.php or forumdisplay.php (depands on where you need this modification added), it doesn't really matter exact location inside file - just needs to make sure it's declared before sending template into eval(), otherwise var won't be available.

also another correction if you're using indeed 3.0.xx, then i think array that should be used is indeed $forum[] & not $foruminfo[], like i wrote before.
__________________
Idan / vBHackers.com
vBSEO 3.1 GOLD Released vB Blogs Compatible | Non-Encrypted | Branding Removal Option | Sitemaps 2.1 | Language Packs

Crawlability Network: vBulletin SEO | vBulletin Hackers




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2006, 05:28 AM   #5
vB User
Join Date: Aug 2006
Real Name: Samantha
Samantha is on a distinguished road

Default

Well thanks, I am using vB version 3.5.2 (as testboard) and vB 3.6.0 (as official forum). So I have to use the hook system, right? Pardon me but where is the hook system located?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2006, 06:56 AM   #6
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Go into your admin control panel (ACP) and then near the bottom of the navigation is Plugin And Product System click on the arrow to drop it down and then click on add new plugin. Then choose a name, a hook location and the code that Idan gave you.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2006, 07:41 AM   #7
vB User
Join Date: Aug 2006
Real Name: Samantha
Samantha is on a distinguished road

Default

Thanks rogersnm, I need to use this modification on forumdisplay so the right location for the hook would be forumdisplay_moderator, is that right? Or maybe forumdisplay_start?




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2006, 09:25 AM   #8
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

Not sure, try start.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2006, 03:57 PM   #9
vB User
Join Date: Aug 2006
Real Name: Samantha
Samantha is on a distinguished road

Default

Quote:
Originally Posted by rogersnm
Not sure, try start.
Will try it there then, thank you guys ;)




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-31-2006, 03:57 PM   #10
vBulletin Guru
Nick R's Avatar
Join Date: May 2006
Real Name: Nick
Location: Cyberspace, UK
Nick R is on a distinguished road

Default

ps. i don't think that will work as a hook location.




Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
create templates FoxFireDiego General vBulletin Support 28 10-07-2006 03:16 AM
is there a way to create multiple annoments jeneepen General vBulletin Support 4 06-05-2006 09:42 PM
if condition question netzoner General vBulletin Support 5 02-17-2006 05:46 PM
create subdomains automatic premium vBulletin Modification Requests 1 12-29-2005 07:28 AM
if condition (forum only) Ghost Shadow vBulletin Modification Requests 2 12-07-2005 11:10 AM


All times are GMT -3. The time now is 08:17 PM.


SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc. (Patent Pending)