vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   How to show on This Script Albumid = XX only (https://vborg.vbsupport.ru/showthread.php?t=310947)

Scalemotorcars 05-01-2014 03:14 PM

How to show on This Script Albumid = XX only
 
How can I show on a specific album id. The below script displays fine on album.php but I don't want it there, rather on the exact album id number.

Thanks...:up:

PHP Code:

if(THIS_SCRIPT != 'album'){
    
ob_start();     
   
MY CODE    
    ob_end_clean
();  
}  
return 
$my_output


Lynne 05-01-2014 04:42 PM

So you want a condition like.... if albumid = xx ? We need to know where this code is going first, like are you adding it to a file or as a plugin (what hook)?

Scalemotorcars 05-01-2014 10:25 PM

Im using forum blocks and the Sidebar Anywhere from Pops hack. Im trying to display the sidebar on just the album with number 24. And to all usergroups except 17.

VBninja has been helping out but its still not showing. I checked permissions and cant find the reason.

Here's the code so far. I know the output works and if I change the IF to This Script (albums) but then it shows everywhere in the albums.

PHP Code:

$subscriber_usergroupids = array(17);   
if(
vB::$vbulletin->GPC['albumid'] == 24 AND !is_member_of(vB::$vbulletin->userinfo$subscriber_usergroupids)){   
    
ob_start();       
    require_once(
$_SERVER['DOCUMENT_ROOT'] . "/phpbay/ebay.php");      
    
phpBayAPI("(vallejo,paint)""18""2594""stand,powder"""true);      
    
$my_output ob_get_contents();       
    
ob_end_clean();    
}      
return 
$my_output


Lynne 05-02-2014 02:22 AM

You should ask in the mod thread if anyone there knows the right condition. I don't since I don't use the mod.


All times are GMT. The time now is 10:31 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01061 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete