vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   exclude forums (https://vborg.vbsupport.ru/showthread.php?t=35290)

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')."\";");

TECK 02-22-2002 12:46 AM

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

TECK 02-22-2002 01:05 AM

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')."\";");

TECK 02-22-2002 01:17 AM

open showthread.php. find the code:
PHP Code:

$forum=getforuminfo($thread['forumid']); 

below this add:
PHP Code:

if ($bbuserinfo[userid]==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

TECK 02-22-2002 01:20 AM

ok ;)

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.

TECK 02-22-2002 01:29 AM

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.

TECK 02-22-2002 01:32 AM

;) 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

TECK 02-22-2002 01:42 AM

i'm glad that you agree with me. read more here please:
https://vborg.vbsupport.ru/showthrea...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.

TECK 02-22-2002 01:48 AM

thanks lionel

Lionel 02-22-2002 02:03 AM

I get a javascript error again here

I skipped global.php, place the code twice in showtread, ran the template... , placed code in headinclude... , js in forums...

TECK 02-22-2002 02:13 AM

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

TECK 02-22-2002 02:21 AM

you are welcome lionel. glad it worked great.

TECK 02-22-2002 02:41 AM

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

TECK 02-22-2002 02:53 AM

try this:
PHP Code:

$vbpopup='';
if (
$bbuserinfo[userid]==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

TECK 02-22-2002 03:06 AM

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...

TECK 02-22-2002 03:18 AM

ok... replace the code with this:
PHP Code:

$header='';
$vbpopup='';
$footer='';

// parse PHP include ##################
eval(gettemplate('phpinclude',0,0));

// parse css, header, vbpopup code & footer ##################
if ($bbuserinfo['userid']==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

TECK 02-22-2002 03:24 AM

hehe, i change it. i put the != negation instead of == afirmation. :p


All times are GMT. The time now is 06:59 AM.

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.01311 seconds
  • Memory Usage 1,781KB
  • 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
  • (4)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (29)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