The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
![]()
I need a conditional for if this style id
|
#2
|
||||
|
||||
![]()
STYLEID (the constant)
|
#3
|
||||
|
||||
![]()
Whats that Conditional look like for templates ?
--------------- Added [DATE]1215542138[/DATE] at [TIME]1215542138[/TIME] --------------- How do i prevent certain mods from showing up on certain styles when theres nothing in the templetes to remove or Block ? |
#4
|
||||
|
||||
![]() Code:
<if condition="$styleid == 3">show something here to style #3</if> |
#5
|
|||
|
|||
![]()
That if condition will always return true.
Code:
<if condition="STYLEID == 3">style 3</if> |
#6
|
||||
|
||||
![]()
As I've said, you can use the constant, STYLEID. Constants are not affected by scope. A implementation is demonstrated above this post by MoT3rror.
|
#7
|
||||
|
||||
![]()
I just want to be able to edit all the fancys out of my Default Template to make a light weight version , Signatures is gone , Avatars are gone , ect...ect... But i have some things like Album photos on Forum home that dont have no code in the forum home template of my light weight style but is still showing on it , how do i have the mod not show on styleid5 ? , even if i knew the conditional at this point it wouldnt do me much good as i dont know how to edit auto templete mods to exclude items with a style id conditional UGH!
|
#8
|
||||
|
||||
![]()
You'll have to find the plugin where the template edit occurs and then wrap it with the conditional.
|
#9
|
||||
|
||||
![]()
cache_templates =
Code:
if (THIS_SCRIPT == "index") { global $globaltemplates; $globaltemplates[] = 'afm_latestfm'; $globaltemplates[] = 'afm_picture'; } Code:
if ( ( $vbulletin->options['socnet'] & $vbulletin->bf_misc_socnet['enable_albums'] AND $permissions['genericpermissions'] & $vbulletin->bf_ugp_genericpermissions['canviewmembers'] AND $permissions['albumpermissions'] & $vbulletin->bf_ugp_albumpermissions['canviewalbum'] AND $vbulletin->options['afm_onoff'] ) ) { $displayrecords = ($vbulletin->options['afm_sayi'] ? $vbulletin->options['afm_sayi'] : 4); switch ($vbulletin->options['afm_dt']) { case 1: $sorgu = "ORDER BY dateline DESC LIMIT 0, $displayrecords"; break; case 2: $sorgu = "ORDER BY rand(NOW()) DESC LIMIT 0, $displayrecords"; break; } $lpictures = $db->query(" SELECT albumpicture.*, album.*, user.username, user.usergroupid, IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid FROM " . TABLE_PREFIX . "albumpicture AS albumpicture LEFT JOIN " . TABLE_PREFIX . "album AS album ON(album.albumid = albumpicture.albumid) LEFT JOIN " . TABLE_PREFIX . "user AS user ON(user.userid = album.userid) WHERE album.state = 'public' $sorgu "); if ($db->num_rows($lpictures)) { while ($lpicture = $db->fetch_array($lpictures)) { $lpicture['musername'] = fetch_musername($lpicture); $lpicture['title'] = trim(strip_quotes($lpicture['title'])); eval('$resimler .= "' . fetch_template('afm_picture') . '";'); } switch ($vbulletin->options['afm_yer']) { case 1: $vbulletin->templatecache['navbar'] .= $vbulletin->templatecache['afm_latestfm']; break; case 2: $vbulletin->templatecache['FORUMHOME'] = str_replace('<!-- main -->', '<!-- what\'s going on box -->'.$vbulletin->templatecache['afm_latestfm'], $vbulletin->templatecache['FORUMHOME']); break; case 3: $vbulletin->templatecache['FORUMHOME'] = str_replace('<!-- what\'s going on box -->', '<!-- end what\'s going on box -->'.$vbulletin->templatecache['afm_latestfm'], $vbulletin->templatecache['FORUMHOME']); break; case 4: $vbulletin->templatecache['FORUMHOME'] = str_replace('<!-- end what\'s going on box -->', '<!-- end what\'s going on box -->'.$vbulletin->templatecache['afm_latestfm'], $vbulletin->templatecache['FORUMHOME']); break; } } $db->free_result($lpictures); } thanks |
#10
|
||||
|
||||
![]()
Find:
PHP Code:
PHP Code:
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|