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)

BiReL41r 12-16-2005 07:42 PM

I might try this...looks like a good hack.

dreamer81 12-16-2005 08:03 PM

ok it works now, but how do i cloak my urls????

i mean REAL cloaking, i currently have a cool javascript that i created myself, that cloaks the url. even when u right click on the link. Most cloaking software fails on this, but not my script, so how do i implement that?

dreamer81 12-17-2005 10:21 AM

ok huge bug!!

this line will only show the first ad
PAN ad: <ad what="zone:2" /> <ad what="zone:1" />

for some reason, i cannot show two ads on the same line in the template. I have no idea why..... can you fix this?

Smiry Kin's 12-17-2005 05:39 PM

Very Nice System! excatly what im looking for! :)

The M.I.P. 12-18-2005 12:54 AM

Quote:

Originally Posted by dreamer81
this line will only show the first ad
PAN ad: <ad what="zone:2" /> <ad what="zone:1" />
for some reason, i cannot show two ads on the same line in the template. I have no idea why..... can you fix this?

Thx for reporting this. It was caused by a buggy regular expression and is fixed in version 1.0.3 of this product. Please see upgrade section in my first post.

Quote:

Originally Posted by fbastello
Basically, I added the following line just before return "<!-- BEGIN ad {$adcomment} -->{$ad['html']}<!-- END ad {$adid} -->";
in the view_ad function plugin:
$phpAds_context[] = array('!=' => 'bannerid:'.$ad['bannerid']);

This basically will allow you to have several <ad what="zone:1" /> anywhere in your templates and be sure that the same banner is not displayed twice.

I also thought about this before, but didn't implement it, because in my eyes, a zone denotes a location and therefore should be unique on page.
But as it might be useful for some people, I added this to version 1.0.3 introducing a new setting "Banner Dupe Check". However - I don't recommend using the same zone repeatedly on a page.

fbastello 12-18-2005 12:36 PM

Brilliant! Thanks for the update!

apfparadise 12-20-2005 06:56 AM

Great Mod, INSTALLED!!!! Working flawlessly.

tanyeri24 12-26-2005 01:16 AM

I getting this error if I put the <ad ..> tag on header template:
Fatal error: Call to a member function scalarval() on a non-object in /home/security/public_html/includes/lib-xmlrpc.inc.php on line 729

I have remote phpadsnew and copied the 2 files to my forum includes (describted like on your NOTES..)

Thx for helping in advance

Masiello 12-26-2005 05:37 PM

Fantastik Thread and Mod, Thanks!

Masiello 12-26-2005 05:56 PM

I have found a code to set a schedule Tasks to work on vbulletin, but it seems not working really after the time I have set and dont working in general, anyone Have any idea how to set fine in Schedule Tasks of vbulletin?

Masiello 12-26-2005 06:16 PM

I add that code
HTML Code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
        <td align="$stylevar[left]"><a href="$vboptions[forumhome].php$session[sessionurl_q]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
        <td align="$stylevar[right]">
        <ad what="unks" />
                &nbsp;
        </td>
</tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output

But when i try to save it, return me this:

HTML Code:

Database error in vBulletin 3.5.2:

Invalid SQL:

                        INSERT INTO vb3_template
                                (styleid, title, template, template_un, dateline, username, version, product)
                        VALUES
                                (1,
                                '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(\"unks\", \"0\", \"\", \"\", \"0\") . \"\r\n                &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=\"unks\" />\r\n                &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',
                                5756784532,
                                'admin',
                                '3.5.2',
                                'vbulletin');

MySQL Error  : Table 'lottosqueeze-org_5.vb3_template' doesn't exist
Error Number : 1146
Date        : Monday, December 26th 2005 @ 09:14:08 PM
Script      : http://www.lottosqueeze.org/forum/admincp/template.php
Referrer    : http://www.lottosqueeze.org/forum/admincp/template.php?s=&do=add&dostyleid=1&title=header&group=all&searchstring=&expandset=1
IP Address  : 87.3.252.86
Username    : admin
Classname    : vb_database

It seems try to save my Header template in the database of phpadsnew and not on vbulletin db

FROGGYJ 12-26-2005 06:26 PM

Great Mod! works great! I have setup my first zone in the header, but now I want to add another one perhaps just above the forums and below the shoutbox.....I know I just have to change the zone id...but I can't seem to find the right spot in the templates. I tried forumhome and forumdisplay just above $forumbits but that didn't work. Anyone know?

Masiello 12-26-2005 06:55 PM

I have solved my issue, Thanks anyway :) and thanks for this great tool

Masiello 12-26-2005 07:14 PM

Only a short question, But this tool work with a SQL Banner or not?

tanyeri24 12-28-2005 02:37 PM

Quote:

Originally Posted by tanyeri24
I getting this error if I put the <ad ..> tag on header template:
Fatal error: Call to a member function scalarval() on a non-object in /home/security/public_html/includes/lib-xmlrpc.inc.php on line 729

I have remote phpadsnew and copied the 2 files to my forum includes (describted like on your NOTES..)

Thx for helping in advance

hey dude you're not good enough the resolve it? please give only a short answer if you able to fix or not then can I look somewhere else..

FROGGYJ 12-28-2005 04:44 PM

Quote:

Originally Posted by Masiello
Only a short question, But this tool work with a SQL Banner or not?

works with mine...in fact doesn't matter what kind of banner.

Masiello 12-28-2005 05:04 PM

I dont show any banner, i solved this just copyng invocation code of phpAdsNew in my Header template, that's all, whitout using any product.

Trickle 12-28-2005 06:40 PM

I don't know about this one, it doesn't seem very newbie user friendly for me. My eyes are bugged eyed right now from reading about 300 pages of installation and I still can't get it to work. Anyone got a Dummies guide for this? I know I am soooo close I can smell it like a fart in the car on a hot august day. Once I create the new advertiser and upload the banner, I can't figuer out how to get it to show up in the linked zone section.

/edit
Making progress here. Bent and determined to figure this one out. I am now getting this error when I add the <ad what"zone:1" /> to the header

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

Can anyone please tell me what that means. Be gentle I've just started doing VB in the last few weeks.

Trickle

Masiello 12-29-2005 05:33 AM

Put that library in to the includes directory of your forum, it is inside "libraries" directory of phpAdsNew, when you try again if it ask needing another libs, you find in the same "libraries" dir.

Trickle 12-29-2005 06:36 PM

So far I got it to work now. Or at least the banner appears. I guess the lesson I learned is to take breaks and refresh the mind. Getting pissed cause I couldn't figure it out only made things worse.

CHECK INSTALLED!!!

Hostboard 12-29-2005 08:30 PM

I wanted my banners to appear under the Navbar so I added

Code:

<ad what"zone:1" />
To the bottom of the template and when I went to save it I got the following error. Any idea?

Code:

Database error in vBulletin 3.5.2:
Invalid SQL:

  SELECT title, styleid
  FROM template
  WHERE templateid = 1020;

MySQL Error  : Table 'phpads.template' doesn't exist
Error Number : 1146
Date                : Thursday, December 29th 2005 @ 05:26:00 PM
Script          : [removed]
Referrer        : [removed]
IP Address  : [removed]
Username        : [removed]
Classname        : vb_database


Masiello 12-29-2005 08:34 PM

You have to set the correct path of phpAdsNew on the forum

Hostboard 12-29-2005 10:02 PM

I did that :) I even cut and pasted it in to the command line to change directories and it is perfect.

Maybe I need a slash at the end?

Code:

/usr/local/path/to/my/phpAdsNew

beansbaxter 12-30-2005 05:02 AM

I've been trying for two hours and I cannot get this to work running on 3.5.2!!!!!

This has to be the most difficult thing to get working (sigh)

I do everything, but no banner shows up at all uggggggggggg

beansbaxter 12-30-2005 05:19 AM

Quote:

Originally Posted by fbastello
OK, I think I cracked it
Basically, I added the following line just before return "<!-- BEGIN ad {$adcomment} -->{$ad['html']}<!-- END ad {$adid} -->";
in the view_ad function plugin:
$phpAds_context[] = array('!=' => 'bannerid:'.$ad['bannerid']);

This basically will allow you to have several <ad what="zone:1" /> anywhere in your templates and be sure that the same banner is not displayed twice.

I've just done it so it's not quite well tested yet, I'm sure that the whole thing could be improved via the ad tag (something like <ad what="zone:1" duplicate_banner_id="1" /> or <ad what="zone:1" duplicate_banner_id="0" /> to switch the option on or off).

Hope this help and thanks again for this great plugin!
F

I got it to work finally, by doing this (sigh)...it's a good hack, just needs better instructions and support IMHO. I'm gonna click install now. Thanks.

Hostboard 12-30-2005 09:15 AM

Ok I added this line but now I get 2 errors when I try entering
Code:

<ad what"zone:1" />
into my NAVBAR template

Code:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/local/path/to/forums/includes/init.php(292) : eval()'d code on line 123
Code:

Fatal error: Call to undefined function: view_ad() in /usr/local/path/to/forums/includes/adminfunctions_template.php(3537) : eval()'d code on line 225
Snipit from view_ad function plugin to show where I put the statement

Code:

Remember bannerid to prevent showing banner multiple times on same page
        $phpAds_context[] = array('!=' => 'bannerid:'.$ad['bannerid']);
        }
 
        return "
$phpAds_context[] = array('!=' => 'bannerid:'.$ad['bannerid']);
<!-- BEGIN ad {$adcomment} -->{$ad['html']}<!-- END ad {$adid} -->";
  }
  }
 }
}


Hostboard 12-30-2005 09:33 AM

Ok now I am not happy. I have been trying to figure this out so I chnaged the config file of phpAdsNew as noted, copied the 2 files over to the includes directory and blew VB completly out of the water. All I get now when trying to access the forums or ACP is:

Code:

Parse error: parse error, expecting `T_STRING' or `T_VARIABLE' or `T_NUM_STRING' in /usr/local/pwrhouse/htdocs/hostboard/forums/includes/init.php(292) : eval()'d code on line 122


Unable to add cookies, header already sent.
File: N/A
Line: 0


Sigh...

Can anyone tell me how to manualy modify whatever it is I need to get at least the system back up???

Masiello 12-30-2005 09:53 AM

Quote:

Originally Posted by Hostboard
I did that :) I even cut and pasted it in to the command line to change directories and it is perfect.

Maybe I need a slash at the end?

Code:

/usr/local/path/to/my/phpAdsNew

Yes :) using a slash at the end

Hostboard 12-30-2005 10:47 AM

Ok, but I need to know how to edit this stuff manulally now seeing as I am completly dead in the water.

Trickle 12-30-2005 02:09 PM

Ok I lied. Added another banner and now the 2 banners do not rotate. Guess I'll wait till there is a dummies how to set of instructions hopefully in the near future.

Puntoboy 12-31-2005 02:53 PM

i'm quite new to all this, how do i install the xml file?

kevinrstruck 01-02-2006 07:38 PM

I have this working but I am not sure of one thing:

I am using a affiliate program for a company that using Kolimbo.com to run their program.

The code they give me to produce the banner looks like this:

Code:

<A href="?kbid=62123&sub=153310&img=Adorama-468x60.gif" onmouseover="window.status='http://www.adorama.com';return true;" onmouseout="window.status=' ';return true;" target="_blank"><img src="http://www.adorama.com/banners/affil/Adorama-468x60.gif" border=0></a><img src="http://www.myaffiliateprogram.com/u/adorama/showban.asp?id=62123&sub=153310&img=Adorama-468x60.gif" border=0>
How in the heck would I put this code in to PAN?

Then again, maybe this is a question best answered over at the PAN support area, but I figured maybe someone here may be able to help.

Great plugin by the way...Nice job.

kevinrstruck 01-02-2006 07:41 PM

Quote:

Originally Posted by Puntoboy
i'm quite new to all this, how do i install the xml file?

VB CP -> Plugin System -> Manage Products -> Add/Import Product

There you can browse to the copy of the XML file you downloaded and save to your local machine then click IMPORT.

Puntoboy 01-02-2006 07:43 PM

thanks, i never had that option until i upgraded to 3.5.2 today.

kevinrstruck 01-02-2006 08:59 PM

No problem. Glad I could help.

FROGGYJ 01-02-2006 09:47 PM

@Kevinstruck

You can copy that whole code right into your "html" banner. Then also copy the href part into the href section in PAN.

kevinrstruck 01-03-2006 01:17 AM

Well, I thought I had this working.

Using the <ad.../> tags, I can not get a banner to display. Using the direct code from PAN, the banners display.

I installed PAN outside my forums directory in the root so I could use it on my portal as well.

I tried an URL in the Server Setting and Opt screen and uploaded lib-xmlrpc-class.inc.php and lib-xmlrpc.inc.php into the forums/includes folder to see if that would work but it would not.

I then tried a full path:

/home/thephoto/public_html/adserver

But that did not work.

I then tried ../adserver

but that did not work either.

Again, I tested PAN and it is serving ads on both a test page and with the direct code (Javascript) pasted into my header.

Anyone have any suggestions?

tgmorris 01-03-2006 01:44 AM

Make sure you've done what was posted a few pages back...
Quote:

Please make sure to have set $phpAds_config['compatibility_mode'] = true; in phpAdsNew config file, as this resolves problems with a local phpAdsNew installation when phpAdsNew's tables are in a database different from the one used by your vBulletin board.
Once I did that it worked fine with my PAN in a separate db.

kevinrstruck 01-03-2006 01:53 AM

Yes, I did that.

Here is my config file:

Code:

// Database local connection using sockets
$phpAds_config['dblocal'] = false;

// Database hostname
$phpAds_config['dbhost'] = 'localhost';

// Database port
$phpAds_config['dbport'] = 3306;

// Database username
$phpAds_config['dbuser'] = 'xxxxx';

// Database password
$phpAds_config['dbpassword'] = 'xxxxx';

// Database name
$phpAds_config['dbname'] = 'thephoto_adserver';

// Database table name prefix
$phpAds_config['table_prefix'] = 'phpads_';

// Database table type
$phpAds_config['table_type'] = 'MYISAM';

// Use persistent connections to the database
$phpAds_config['persistent_connections'] = true;

// Use INSERT DELAYED in logging functions?
$phpAds_config['insert_delayed'] = true;

// Database compatibility mode to insure phpAdsNew
// won't disturb an available database connection
$phpAds_config['compatibility_mode'] = true;



/*********************************************************/
/* phpAdsNew configuration                              */
/*********************************************************/

// The URL to your phpAds-installation
$phpAds_config['url_prefix'] = 'http://www.thephotostation.net/adsever/';

// Is the admin interface enabled
$phpAds_config['ui_enabled'] = true;

// Only allow access to the admin interface if SSL is used
$phpAds_config['ui_forcessl'] = false;


kevinrstruck 01-03-2006 02:00 AM

Another issue: When I add the tag, I get a blank screen on my forums. When I take the ad code out, the forums come up normally.

Here is the ad code I am trying to use:

<ad what="zone:2" />


My Header Template is:
Code:

<!-- logo -->
<a name="top"></a>
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr>
        <td align="$stylevar[left]"><a href="$vbpoptions[portalhome]"><img src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a></td>
        <td align="$stylevar[right]">
                    &nbsp;
<!--
  NEW HEADER &amp; NAVBAR

  Now that the nav buttons are in the
  navbar template, you can stick whatever
  you like into this space.

  This makes it much easier for novice
  admins to customize their header
  template without affecting important
  navigation elements.
-->
        </td>
</tr>
</table>
<!-- /logo -->

<!-- content table -->
$spacer_open

$_phpinclude_output

My path to PAN in Server Settings and Opt is:

/home/thephoto/public_html/adserver
I hope I have included enough info for someone to figure this out for me.


All times are GMT. The time now is 07:41 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.01839 seconds
  • Memory Usage 1,863KB
  • 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
  • (12)bbcode_code_printable
  • (2)bbcode_html_printable
  • (8)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