Member Log In
Site Navigation
Latest Modifications
- [vB 3.8.4] THX - Hack for VB. 3.8.4
By: bluedog - [vB 3.8.4] Cyb - Chatbox V.2.3
By: bluedog - [vB 4.0.x] PHPKD - Advanced Quick...
By: PHPKD - [vB 3.6.x] StopSpam
By: flappi282 - [vB 3.8.x] vBulletin Chat Addon for...
By: 123flashchat
Latest Template Mods
- [vB 4.0.x] Remove My Profile Link...
By: Ak Worm - [vB 3.8.x] Images DownloadBox...
By: cRs!MP - [vB 3.8.x] Adviertise Mod On Forum...
By: MG4 - [vB 3.8.4] Images PassWordBox...
By: cRs!MP - [vB 3.8.4] Footer Follow Ups
By: Ak Worm
Latest Styles
- [vB 4.0.x] 4.0.3 - VB4STYLE-TWEETA...
By: Belon - [vB 4.0.x] [4.0.3] vbdesigns.de...
By: Belon - [vB 3.8.4] CompletevB - Skylight
By: DreadKnight - [vB 3.8.3] [vB 3.8.4] Barcelona...
By: hoiquantinhoc.com - [vB 3.8.3] Natures Walk by vBSkin...
By: Chri5
Latest Graphics
- [vB ] [anim.]Team Ranks
By: cRs!MP - [vB ] Abstract Circles (3...
By: cRs!MP - [vB ] PlayStation Rank Images
By: cRs!MP - [vB 3.6.12] Heavy Stroked Button...
By: Shelley - [vB ] Minature Ranks.
By: Shelley
![]() |
| | #1 | ||||||||
| vB User
![]() |
Status: Offline 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: Code: if forum x has one ore more moderators then: DO SOMETHING else DO NOTHING Can someone help please? Kindest Regards Samantha | ||||||||
|
| | #2 | |||||||||
Location: Israel Age: 29 ![]() |
Status: Offline 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: PHP Code: Code: <if condition="$mods_num"> do something <else /> do something else, or if nothing don't use this else ;) </if> Regards, Idan. * Support will only be given via forums ! * If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here | |||||||||
|
| | #3 | |||||||||
| vB User
![]() |
Status: Offline Quote:
Thank you! Kisses Samantha | |||||||||
|
| | #4 | |||||||||
Location: Israel Age: 29 ![]() |
Status: Offline 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. Regards, Idan. * Support will only be given via forums ! * If this post solved/aided your problem, please click "mark as aid" / "mark as solution" as explained in here | |||||||||
|
| | #5 | ||||||||
| vB User
![]() |
Status: Offline 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? | ||||||||
|
| | #6 |
| |
Status: Offline 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. |
|
| | #7 | ||||||||
| vB User
![]() |
Status: Offline 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? | ||||||||
|
| | #8 |
| |
Status: Offline Not sure, try start. |
|
| | #9 | |||||||||
| vB User
![]() |
Status: Offline Quote:
| |||||||||
|
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| create subdomains automatic | premium | vBulletin Modification Requests | 1 | 12-29-2005 10:28 AM |
| if condition (forum only) | Ghost Shadow | vBulletin Modification Requests | 2 | 12-07-2005 02:10 PM |
All times are GMT. The time now is 06:03 AM.
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

























