vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   phpAdsNew Banner Ads integration (advertisements, classified ads, Adsense, etc.) (https://vborg.vbsupport.ru/showthread.php?t=100229)

nexus851 01-03-2006 06:07 AM

I got this error in my MEMBERINFO template when i used "<ad what="zone:1" />" in my header. I notice it conflicts with my vbfriends (buddylist) module at https://vborg.vbsupport.ru/showthrea...highlight=foes

When i disable the vbfriends plugin, the error is gone. =(

PHP Code:

Warningmysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/lendinge/public_html/forum/member.php(687) : eval()'d code on line 160 


When i disable the vbfriends plugin below, then the above error is gone. There must be a compatibility problem. Please check this script out and tell me what to change or do to fix this.

PHP Code:

if ($_REQUEST['do'] != "ignorelist") { $whichlist "buddylist"; }
else { 
$whichlist "ignorelist"; }
$whichlistshort ereg_replace("list"""$whichlist);

// (Dis)Likes
$outcounter 0;
$outuserids = array();
$outuserids explode(' 'trim($userinfo[$whichlist]));
if (
trim($userinfo[$whichlist]) != "") {
    
$outusers $vbulletin->db->query("SELECT ".TABLE_PREFIX."user.username,".TABLE_PREFIX."user.userid,".TABLE_PREFIX."usertextfield.".$whichlist." FROM
    "
.TABLE_PREFIX."user,".TABLE_PREFIX."usertextfield WHERE
    "
.TABLE_PREFIX."user.userid = ".TABLE_PREFIX."usertextfield.userid AND
    "
.TABLE_PREFIX."user.userid IN (".implode(',',$outuserids).")
    ORDER BY username"
);
    while (
$outuser mysql_fetch_array($outusers)) {
        if (
$vbulletin->userinfo['userid'] == $vbulletin->GPC['userid']) {
            
$outuserlist .= "<a class=\"smallfont\" href=\"".$vbulletin->options['bburl']."/profile.php?do=removelist&userlist=$whichlistshort&u=$outuser[userid]\">[-]</a>&nbsp;&nbsp;";
        }
        
$outuserlist .= "<a class=\"smallfont\" href=\"".$vbulletin->options['bburl']."/member.php?u=$outuser[userid]\"/>$outuser[username]</a>";
        
$outuserlist .= "<br>";
        
$outcounter++;
    }
}

// (Dis)Liked By
$inoutcounter 0;
$incounter 0;
$inusersquery "SELECT ".TABLE_PREFIX."user.username,".TABLE_PREFIX."user.userid,".TABLE_PREFIX."usertextfield.".$whichlist." FROM
"
.TABLE_PREFIX."user,".TABLE_PREFIX."usertextfield WHERE
"
.TABLE_PREFIX."user.userid = ".TABLE_PREFIX."usertextfield.userid AND
FIND_IN_SET('"
.$userinfo[userid]."', REPLACE(".TABLE_PREFIX."usertextfield.".$whichlist.", ' ', ',')) > 0
ORDER BY "
.TABLE_PREFIX."user.username";
$inusers mysql_query($inusersquery);
while (
$inuser mysql_fetch_array($inusers)) {
    
$incounter++;
    
// Bi-Directional (Dis)Like
    
if (in_array($inuser[userid], $outuserids)) {
        if (
$vbulletin->userinfo['userid'] == $vbulletin->GPC['userid']) {
            
$inuserlist .= "<a class=\"smallfont\" href=\"".$vbulletin->options['bburl']."/profile.php?do=removelist&userlist=$whichlistshort&u=$inuser[userid]\">[-]</a>&nbsp;&nbsp;";
        }
        
$outuserids2 explode(' 'trim($inuser[$whichlist]));
        
$inuserids2 = array();
        
$inuserids1 mysql_query("SELECT userid FROM ".TABLE_PREFIX."usertextfield WHERE
        FIND_IN_SET('"
.$inuser[userid]."', REPLACE(".$whichlist.", ' ', ',')) > 0");
        while (
$inuserid1 mysql_fetch_array($inuserids1)) {
            
$inuserids2[] = $inuserid1[userid];
        }
        
$inoutuserids2 array_intersect($outuserids2$inuserids2);
        
$inoutcounter2 count($inoutuserids2);
        
$avatar_url fetch_avatar_url($inuser['userid']);
        
$inuser[avatarurl] = $avatar_url[0];
        if (
$inuser[avatarurl] == "") { $inuser[avatarurl] = "clear.gif"; }
        
$inoutuserlist .= "<td class=\"smallfont\" align=\"center\" width=\"100\">";
        
$inoutuserlist .= "<a href=\"".$vbulletin->options['bburl']."/member.php?u=$inuser[userid]\"/>";
        
$inoutuserlist .= "<img width=75 height=75 border=1 src=\"$inuser[avatarurl]\"><br>";
        
$inoutuserlist .= "$inuser[username]</a><!-- ($inoutcounter2)-->";
        
$inoutuserlist .= "</td>";
        
$inoutcounter++;
        if ((
$inoutcounter 7) == 0) { $inoutuserlist .= "</tr><tr>"; }
    }
    else {
        if (
$vbulletin->userinfo['userid'] == $vbulletin->GPC['userid']) {
            
$inuserlist .= "<a class=\"smallfont\" href=\"".$vbulletin->options['bburl']."/profile.php?do=addlist&userlist=$whichlistshort&u=$inuser[userid]\">[+]</a>&nbsp;&nbsp;";
        }
    }
    
$inuserlist .= "<a class=\"smallfont\" href=\"".$vbulletin->options['bburl']."/member.php?u=$inuser[userid]\"/>$inuser[username]</a>";
    
$inuserlist .= "<br>";
}

$mutual = @round((($inoutcounter $outcounter) * 100), 0);
$avatar_url fetch_avatar_url($userinfo['userid']);
$userinfo[avatarurl] = $avatar_url[0];
if (
$userinfo[avatarurl] == "") { $userinfo[avatarurl] = "clear.gif"; }

$FRIENDSFOES "<table class=\"tborder\" cellpadding=\"$stylevar[cellpadding]\"
cellspacing=\"
$stylevar[cellspacing]\" border=\"0\" width=\"100%\" align=\"center\">";
$FRIENDSFOES .= "<tr>";
if (
$whichlist == "buddylist") { $FRIENDSFOES .= "<td class=\"tcat\" colspan=\"2\">$userinfo[username]'s Buddies ($inoutcounter) <!--... $mutual% Mutual--></td>"; }
if (
$whichlist == "ignorelist") { $FRIENDSFOES .= "<td class=\"tcat\" colspan=\"2\">$userinfo[username]'s Buddies ($inoutcounter) <!--... $mutual% Mutual--></td>"; }
$FRIENDSFOES .= "</tr><tr>";
$FRIENDSFOES .= "<td class=\"alt2\" colspan=\"2\">";
$FRIENDSFOES .= "  <table>";
$FRIENDSFOES .= "  <tr>";
$FRIENDSFOES .= $inoutuserlist;
$FRIENDSFOES .= "  </tr>";
$FRIENDSFOES .= "  </table>";
$FRIENDSFOES .= "</td>";
$FRIENDSFOES .= "</tr>";
$FRIENDSFOES .= "</table>"

Please help!

Puntoboy 01-03-2006 12:13 PM

i've installed this as described above.

how do i get the ads to appear above the forum display, but below the Nav bar?

PennylessZ28 01-03-2006 09:56 PM

I got it working, learning to use phpadsnew is another story, couldn't be setup more stupidly

Puntoboy 01-03-2006 09:57 PM

sounds like i havent got a chance of getting this to work then.

kevinrstruck 01-04-2006 05:50 AM

Quote:

Originally Posted by Puntoboy
i've installed this as described above.

how do i get the ads to appear above the forum display, but below the Nav bar?

You just need to edit your template as needed.

Puntoboy 01-04-2006 09:09 AM

but how, and which template?

i'm a total n00b to this, learning as i go along.

i'm not even sure i have phpadsnew configured right.

FROGGYJ 01-04-2006 09:46 PM

How do you reverse the usage on usergroups. Say I want to display ads to all users except for site supporters.....oh and site supporters is an alternate group not a primary.

FROGGYJ 01-04-2006 09:58 PM

Would this work?

<if condition="!$bbuserinfo['usergroupid']==1"><ad what="zone:1" /></if>

I'm pretty sure ! reverses the logic....just not sure on placement.

FROGGYJ 01-04-2006 10:05 PM

woot it works!

johnscanlan 01-05-2006 08:05 PM

Oh my yes THANKS

matthias.m 01-06-2006 09:03 PM

Got a Problem with the Cron-Entry of PHPAdsNew in vBulletin: I doesn`t know how to setup this Cron :nervous:

My PHPAdsNew-Installation is in the Directory "/home/pb/public_html/boardhome/werbung"

So I have filled out the Cronentry withe the following Path "/boardhome/werbung/maintenance/maintenance.php"

Now I am getting this Error:
Code:

Warnung: main(/home/pb/public_html/boardhome/forum//boardhome/werbung/maintenance/maintenance.php): failed to open stream: No such file or directory in /admincp/cronadmin.php (Zeile 64)

Warnung: main(): Failed opening '/home/pb/public_html/boardhome/forum//boardhome/werbung/maintenance/maintenance.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /admincp/cronadmin.php (Zeile 64)

Seems that vBulletin adds my Path after the Forum-Root? - What the hell do i do wrong??? :ermm:

Greetings,
Matthias

kevinrstruck 01-06-2006 09:13 PM

Is this still being supported?

matthias.m 01-06-2006 09:27 PM

Quote:

Originally Posted by kevinrstruck
Is this still being supported?

Hope so ;)

Ramm 01-09-2006 08:18 PM

Quote:

Originally Posted by matthias.m
Got a Problem with the Cron-Entry of PHPAdsNew in vBulletin: I doesn`t know how to setup this Cron :nervous: ....

you should just fill the cron entry with "../webrung/maintenance/maintenance.php" path :)

matthias.m 01-10-2006 05:21 AM

Thank you Ramm!

Greetings,
Matthias

kommuni 01-10-2006 08:01 PM

Quote:

Originally Posted by matthias.m
Thank you Ramm!

Greetings,
Matthias

@Ramm: did you test this? i get error messages regarding some header stuff when testruning the vb-cronjob with the maintenance.php... maybe this is different when it's really called as cron?

jw00dy 01-11-2006 06:12 AM

Great MOD!!! Thanks you!

Blackhat 01-15-2006 10:24 AM

is there a mirror site for this download ?

criscokid 01-15-2006 11:00 AM

"The features of phpAdsNew combined with the power of vBulletin's templating system gives you the possibility to place ads for specific user groups, forums, and keywords" - Just what I've been after for quite a while - this looks like an awesome plugin!!! Thank you!!!

Bhuwan 01-16-2006 01:25 AM

got it towork!>

Olney 01-16-2006 12:59 PM

Does this work with Max Media Manager the same???

Sinister21 01-16-2006 05:11 PM

Is there a way to install this on VB 3.0.6? if not, is there something similar I can use to integrate Phpadsnew to 3.0.6?

I've installed this hack..
https://vborg.vbsupport.ru/showthrea...ight=phpadnews

but it will not utilize the invocation codes from phpadsnew.

I need to have forum specific ads served accordingly.

Anyhelp is appreciated!

:D thanks guys!

markbolyard 01-17-2006 02:17 PM

Any idea how to show two zones (not at the same time, but alternating / allowing each) to show up in one spot?

IE: <ad what="zone:5", "zone:6" />

I have a spot that I want to show 120 width and 160 width banners in, and each of those are different zones, so I want to make one tag, that will show ads from both zones. Thanks.

yayvb 01-17-2006 02:41 PM

This message doesn't really belong in here, but I think I may have the best luck posting it in here. I tried to setup this hack to allow for phpadsnew to run ads on my site, but I couldn't get anything to display where I stuck the variables.

To make a long story short I have just been using the javascript code that phpadsnew has me use. The ads have been working wonderfully for more than a month now. Perhaps one of the recent changes that I made to the site that I forgot about did something to each page because now when I go to my site the ads appear to work for about 1 or 2 page views and then they completely disappear. :( If I view source I feel like the code is still there but the ads are no longer there, and internet explorer has the little yellow yield sign at the bottom left telling me that there is an error on line 3 char 1.

:(

Does anyone know why this would happen or what would cause this? If I go into phpadsnew it seems to function perfectly and if I don't go to my site for a while and then go I see the ads for just one or two rotations, but then if I refresh or even go to another page or anything the ads no longer show.

Please see for yourself www.420boards.com

Thanks

Chris

*EDIT: I found that if you go to www.420boards.com with no file specified such as index.php, you can see the ad working fine, even if you refresh 10 times or more you'll be fine. The moment you go to a page that has a filename or even www.420boards.com/index.php, then the banners stop working automatically. :( I've even gone as far as to delete my .htaccess file in hopes of correcting the problem, but nothing. I can't find any recent changes that I've made or anything like that that would cause this to happen.

tgmorris 01-17-2006 03:36 PM

Quote:

Originally Posted by markbolyard
Any idea how to show two zones (not at the same time, but alternating / allowing each) to show up in one spot?

When I wanted to select from 2 different zones I wound up using a template conditional. You could do the same and just randomize or alternate them using some external variable. Just a thought.

Rukas 01-22-2006 03:00 AM

Ive installed this and it seems to have broken member.php, i get the following error:


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /member.php(654) : eval()'d code on line 197

http://www.streethop.com/forum/member.php?u=3

SuperJETT 01-23-2006 02:13 AM

I have PAN working fine www.x-h2o.com/ad.php and imported the .xml and have the path set correctly (to best of my knowledge) but when I try to add the code for an ad to my header I get a database error where it's trying to change a template table in my PAN database, which doesn't exist.

Code:

Database error in vBulletin 3.5.3:

Invalid SQL:

                        ### REPLACE TEMPLATE: header ###
                        REPLACE INTO vbtemplate
                                (styleid, title, template, template_un, templatetype, dateline, username, version)
                        VALUES
                                (2, 'header', '<!-- logo -->\r\n<a name=\\\"top\\\"></a>\r\n<table border=\\\"0\\\" width=\\\"$stylevar[outertablewidth]\\\" cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" align=\\\"center\\\">\r\n<tr>\r\n        <td align=\\\"$stylevar[left]\\\"><a href=\\\"\" . $GLOBALS[\'vbulletin\']->options[\'forumhome\'] . \".php\" . $GLOBALS[\'vbulletin\']->session->vars[\'sessionurl_q\'] . \"\\\"><img src=\\\"$stylevar[titleimage]\\\" border=\\\"0\\\" alt=\\\"\" . $GLOBALS[\'vbulletin\']->options[\'bbtitle\'] . \"\\\" /></a></td>\r\n        <td align=\\\"$stylevar[right]\\\">\r\n                \" . view_ad(\"zone:1\", \"0\", \"\", \"\", \"0\") . \"&nbsp;\r\n        </td>\r\n</tr>\r\n</table>\r\n<!-- /logo -->\r\n\r\n<!-- content table -->\r\n$spacer_open\r\n\r\n$_phpinclude_output', '<!-- logo -->\r\n<a name=\"top\"></a>\r\n<table border=\"0\" width=\"$stylevar[outertablewidth]\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n<tr>\r\n        <td align=\"$stylevar[left]\"><a href=\"$vboptions[forumhome].php$session[sessionurl_q]\"><img src=\"$stylevar[titleimage]\" border=\"0\" alt=\"$vboptions[bbtitle]\" /></a></td>\r\n        <td align=\"$stylevar[right]\">\r\n                <ad what=\"zone:1\" />&nbsp;\r\n        </td>\r\n</tr>\r\n</table>\r\n<!-- /logo -->\r\n\r\n<!-- content table -->\r\n$spacer_open\r\n\r\n$_phpinclude_output', 'template', 1137989173, 'SuperJETT', '3.5.3');

MySQL Error  : Table 'myusername_xads.vbtemplate' doesn't exist
Error Number : 1146
Date        : Sunday, January 22nd 2006 @ 10:06:13 PM

If I try to change the header in a different way, it works fine, but when trying to add <ad what=\"zone:1\" /> that's what happens.

Does this indicate I don't have my path to PAN set correctly?

tgmorris 01-23-2006 03:04 AM

Quote:

Originally Posted by SuperJETT
Does this indicate I don't have my path to PAN set correctly?

It's more likely that you don't have compatibility mode set in PAN. I ran into the same problem as I have PAN in a separate db from my vb install and once I set compatibility mode things started working.

SuperJETT 01-23-2006 09:47 AM

Quote:

Originally Posted by tgmorris
It's more likely that you don't have compatibility mode set in PAN. I ran into the same problem as I have PAN in a separate db from my vb install and once I set compatibility mode things started working.

Where do I send your carrot? Thanks!!! That was it. I assumed the database settings were fine for PAN since it was working and was looking elsewhere.

(I guess in compatibility mode it opens/closes the db connection a little cleaner?)

Omranic 01-23-2006 02:28 PM

can any one explain the used & working tags .. plz

I used to use all possible tags called in the first post here & all not worked wxwpt only the tag <ad /> as I writed it empty with no atribute

plz explain all possible tags knowing that there is many users need to use it but has no experience with phpadsnew

Rukas 01-24-2006 07:52 AM

Is it possible to do an or statement? Zone 1 or zone 2 for example? So it randomly picks one or the other?

Pulsorock 01-24-2006 10:52 AM

Quote:

Originally Posted by Olney
Does this work with Max Media Manager the same???

I have the same question. I use MaxMedia Manager 0.1.x (fork of phpAdsNew) and would like to try this plugin, but I wan't to know that it works with MMM. Thanks....

cmiller1014 01-24-2006 12:23 PM

This sounds like exactly what I need.

Question for you though. I already use phpadsnew and I use the JS call to pull the banners. Is it possible with this mod to display banners based on keywords found on the page the user is viewing?

For example, if they are reading a thread about hamburgers, can I have it display ads from my advertisers who have "hamburger" as a keyword in phpadsnew?

Thanks!

Omranic 01-24-2006 05:07 PM

after working with this product I discovered some erors ocured
1st one is what I have written in the past post
2nd Is there is a conflict between this & secret admire
3rd is that there is a conflict bet. this & mkportal

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/phpkd/phpkd.com/mkportal/include/VB/vb_driverf.php on line 57

Omranic 01-24-2006 05:08 PM

& if I need to edit any mkportal settings It displays

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /hsphere/local/home/phpkd/phpkd.com/mkportal/include/VB/vb_driverf.php on line 57

Warning: Cannot modify header information - headers already sent by (output started at /hsphere/local/home/phpkd/phpkd.com/vb/includes/class_core.php:2957) in /hsphere/local/home/phpkd/phpkd.com/mkportal/admin/ad_blocks.php on line 349

knowing that when I remove any codes related to phpadsnew integreted product from my templates every thing back to normal

shunx91 01-24-2006 10:12 PM

Hi Guys,

I got this message when I tried to modify my templates:

Warning: view_ad(/home/web/clubwrx.net/public_html/forums/includes/lib-xmlrpc-class.inc.php): failed to open stream: No such file or directory in /includes/init.php(292) : eval()'d code on line 68

Can someone please help me out? I tried to upload those two files in the directory but I got a "permission denied" message.

kahmeal 01-25-2006 03:58 AM

Quote:

Originally Posted by Rukas
Ive installed this and it seems to have broken member.php, i get the following error:


Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /member.php(654) : eval()'d code on line 197

http://www.streethop.com/forum/member.php?u=3

Same problem here... I get a member.php(652) : eval()'d code on line 42 and also line 99. Any ideas?

speedway 01-25-2006 10:28 AM

Excellent job! Works well. Thanks for the addition, it saved me a lot of work considering my old phpadsnew solutions required code modificiations!

Oh, and BTW - even though I have this marked as "installed", I never received any notification that the version number had changed....

Cheers
Bruce

Rukas 01-26-2006 09:38 PM

Quote:

Originally Posted by kahmeal
Same problem here... I get a member.php(652) : eval()'d code on line 42 and also line 99. Any ideas?

Have you managed to fix it yet?

Sinister21 01-26-2006 09:44 PM

Quote:

Originally Posted by Sinister21
Is there a way to install this on VB 3.0.6? if not, is there something similar I can use to integrate Phpadsnew to 3.0.6?

I've installed this hack..
https://vborg.vbsupport.ru/showthrea...ight=phpadnews

but it will not utilize the invocation codes from phpadsnew.

I need to have forum specific ads served accordingly.

Anyhelp is appreciated!

:D thanks guys!

^^^ Anyone?? :ermm:


All times are GMT. The time now is 07:20 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.02012 seconds
  • Memory Usage 1,913KB
  • 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_code_printable
  • (2)bbcode_php_printable
  • (11)bbcode_quote_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
  • (40)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