vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Advert Management (https://vborg.vbsupport.ru/showthread.php?t=39074)

Floris 05-30-2002 02:34 PM

Take your time, it is really appriciated. I wish I was as smart as you guys, and do it myself :) I already looked. But ofcourse..

Neopiper 05-30-2002 04:55 PM

heheh for some reason i cant get the ads to view after upgrade, i reinstall the hack becoz of the problem moving thread , now move thread works but the banner didnt show at all

Scott MacVicar 05-30-2002 07:47 PM

change this wee bit in global.php

PHP Code:

if(isset($advert_forumid)) {
  
$foruminfo getforuminfo($advert_forumid);
  
$advert=$DB_site->query_first("SELECT * FROM ads WHERE LOCATE(CONCAT(',',forumid,','),',$foruminfo[parentlist],')>0 AND time>=".time()." AND (exposed<=exposures OR exposures=0) ORDER BY RAND()");
} else {
  
$advert=$DB_site->query_first("SELECT * FROM ads WHERE LOCATE(CONCAT(',',forumid,','),',-1,')>0 AND time>=".time()." AND (exposed<=exposures OR exposures=0) ORDER BY RAND()");


to

PHP Code:

if(isset($advert_forumid)) {
  
$foruminfo getforuminfo($advert_forumid);
  
$advert=$DB_site->query_first("SELECT * FROM ads WHERE LOCATE(CONCAT(',',forumid,','),',$foruminfo[parentlist],')>0 AND (exposed<=exposures OR exposures=0) ORDER BY RAND()");
} else {
  
$advert=$DB_site->query_first("SELECT * FROM ads WHERE LOCATE(CONCAT(',',forumid,','),',-1,')>0 AND (exposed<=exposures OR exposures=0) ORDER BY RAND()");


This will disable the time length function until i get it sorted.

Neopiper 05-30-2002 08:38 PM

thanks PPN :)

Stealthy 06-01-2002 12:08 AM

PPN, I did the edit and it still resets to 1 January 2002. I still cannot see the banners. Have you figured out what the problem could be?

inetd 06-01-2002 05:47 AM

PPN, when you release new version? :)

Scott MacVicar 06-01-2002 09:48 AM

Im having major problems working out what it is, its actually quite puzzling.

Stealthy if you update the code in global.php then time isn't taken into account. Have you set correct zones in the admin panel and the banner isn't all exposed. It can be 0 or a value.

Stealthy 06-01-2002 02:12 PM

PPN, I have tried "0", left it blank, and I have tried other values and still the same thing.

Does it matter where you place the $advert value? I have tried various places within my "header" template and it will not show up anywhere.

dxb 06-01-2002 06:17 PM

thanks alot for this hack PPN and I have one Q .... will this work with vb224 or I have to upgrade to 226 to get it running :)

Parker Clack 06-01-2002 10:33 PM

PPN:

Sorry. I've been working the "day" job. I am running PHP Version v4.1.2 and MySQL Version v3.23.43 on a Linux box.

What is really weird about all of this is that the date showed up correctly when I first created the banner. So it would have in the date line today's date and all would be fine. Then after 0001 came around on the next day the date would get reset to January 1st, 2002. If I deleted the banner and reinstalled it the date would still default to the January 1st, 2002 date. Now if I got out of the admin panel completely then reinstalled the banner the date would be fine until the next date came up and again the $advert would be wrong and the banners don't get displayed.

I know you are working on this and I see no reason why it isn't working either and getting reset instead of staying. I just commented out those lines of code referring to the date and all works as it should.

I am glad to see that others are having issues with this too instead of it being just me screwing something up again. :)

Parker


All times are GMT. The time now is 11:01 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.01367 seconds
  • Memory Usage 1,742KB
  • 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)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete