View Full Version : exclude forums
Lionel
02-21-2002, 03:21 PM
in the below forum, I'd like to exclude some forums. How can I add that simple line?
if ($bbuserinfo['userid']==0) {
eval("\$adpopup = \"".gettemplate('ad_popup')."\";");
lionel, i wanted to add this mod to my hack... check my sig why i changed my mind. you should check my vbPopup hack if you want to have a better version of java code (adapted for VB) and also an easier integration in templates. as for your request here, i will pm you with the code. let me know here if is what you wanted. ;)
Lionel
02-22-2002, 12:59 AM
I saw your hack. I painfully installed mine with a combination of using a different template and it is working. I just have a couple of totally public forums that I do not want to display the popups. Could you please help me?
Lionel
sure lionel
let me know what you need.
i send you a pm with the code change not to show in your selected forums.
Lionel
02-22-2002, 01:08 AM
I am no expert, I struggle on doing what I need. I simply need to finish this line
if ($bbuserinfo['userid']==0) and forumnumber!=[xxx] or forumnumber!=[xxx] {
eval("\$adpopup = \"".gettemplate('ad_popup')."\";");
open showthread.php. find the code:$forum=getforuminfo($thread['forumid']);below this add:if ($bbuserinfo[userid]==0 and ($thread['forumid']!=xx or $thread['forumid']!=xx)) {
eval("\$adpopup .= \"".gettemplate('ad_popup')."\";");
}note: the $forum=... code shows 2 times in showthread.php file. do it twice.
let me know if it worked. ;)
i recommend you to install my hack. due to speed performance and compatibility with VB. plus is totally customizable. check my sig for vbPopup.
Lionel
02-22-2002, 01:18 AM
I am looking at your file now... I just downloaded
Lionel
02-22-2002, 01:25 AM
In your hack, looks like it will popup for every page even the registration page....
Lionel
02-22-2002, 01:28 AM
looks very interesting the way you did it. Since I am also using the flag hack (mandatory) I could serve ad to members leaving in a specific country.
no. it will show only in the templates you place the $vbpopup variable. however, if you want to use the code above, skip the global.php mod.
;) glad you like it lionel. i'm here to help if i can. what do you think about the post in site feedback?
Lionel
02-22-2002, 01:37 AM
the one about your hack? Some people think it is annoying. I disagree totally. Most forums do not let guest read at all. I think it is a good teaser to let them in a little, see what they miss, but cannot give it all. It is better than to keep the guest totally locked out. How would they know about what they are missing?
and you know what? I gain 131 members from intall date
i'm glad that you agree with me. read more here please:
https://vborg.vbsupport.ru/showthread.php?s=&threadid=35304
is about my vbPopup hack, and how people make fun of my work. i went to bed to 4am in the morning only to finish it...
also i need you to tell me if the hack is flexible enough. i tried my best to make it as simple as possible.
Lionel
02-22-2002, 01:46 AM
once I am done, I will post in there.
Lionel
02-22-2002, 02:03 AM
I get a javascript error again here (http://www.haitiwebs.com/haitianforums/forumdisplay.php?forumid=32)
I skipped global.php, place the code twice in showtread, ran the template... , placed code in headinclude... , js in forums...
hmm.. i dont get any java errors and the popup is there
make sure you copy exacly the code... i see that the popup is not placed the same way i know me.. that means you still have some of your old code in there.
Lionel
02-22-2002, 02:19 AM
I reverted, but am using your popup design to display. I am still going to post something in a few. Thanks for help
you are welcome lionel. glad it worked great.
lionel, you still have a problem. you placed the java code in head. this will give you java errors when a member visit the forum! please run the template installer. you will not get anymore errors after that. ;)
Lionel
02-22-2002, 02:48 AM
It's the exclude code that does not work. All excluded forums are popping up
try this:$vbpopup='';
if ($bbuserinfo[userid]==0 and ($thread['forumid']!=xx or $thread['forumid']!=xx)) {
eval("\$vbpopup = \"".gettemplate('vbpopup')."\";");
}make sure you did not add the code in global.php
Lionel
02-22-2002, 03:00 AM
that's what I have... shouldn't it be forum instead of thread? I also have this $adpopup in forumdisplay template
you cannot have it in 2 places... global.php and showthread.php
select only the one you want.
Lionel
02-22-2002, 03:08 AM
it is only in global.php. I reverted to original...
ok... replace the code with this:$header='';
$vbpopup='';
$footer='';
// parse PHP include ##################
eval(gettemplate('phpinclude',0,0));
// parse css, header, vbpopup code & footer ##################
if ($bbuserinfo['userid']==0 and ($forum['forumid']!=xx or $forum['forumid']!=xx)) {
eval("\$headinclude = \"".gettemplate('headinclude')."\";");
eval("\$header .= \"".gettemplate('header')."\";");
eval("\$vbpopup .= \"".gettemplate('vbpopup')."\";");
eval("\$footer .= \"".gettemplate('footer')."\";");
} else {
eval("\$headinclude = \"".gettemplate('headinclude')."\";");
eval("\$header .= \"".gettemplate('header')."\";");
eval("\$footer .= \"".gettemplate('footer')."\";");
}that should do it
Lionel
02-22-2002, 03:20 AM
thanks
hehe, i change it. i put the != negation instead of == afirmation. :p
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.