View Full Version : phpAdsnew
flstreetscene
09-08-2005, 05:58 AM
Can this software be run on 3.5 using local mode invocation? If so how do I go about this? I've been searching continiously between here, vbulletin.com, and phpads forums and found no answer.
Andreas
09-08-2005, 06:16 AM
I didn't try it, but as it was possible in 3.0 it should be possible in 3.5 as well - Hook global_start seems to be a good place.
mikexxx
09-08-2005, 06:27 AM
Did you mean phpadsnew? I use this plugin and it works fine. Just edit your templates where you want the ads. (and if you have more zones you have to ad them)
flstreetscene
09-08-2005, 05:00 PM
I'm sorry but what code goes where?
When I import that plugin it comes back with an SQL error;
MySQL Error : Table 'florida_phpads.session' doesn't exist
MrWee
10-01-2005, 05:14 AM
I also get the "MySQL Error : Table 'XXXXX_phpads.session' doesn't exist" error.
In fact, i get 2 SQL on the same page.
Before the upgrade to 3.5, it worked fine, and after the upgrade, I copied and pasted the exact code from the phpinclude_start template into a plugin with the global_start hook.
This is the code
if (@include('/var/vhosts/com/s/i/s/sistersofbreastfeeding/htdocs/_/adserver/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$phpAds_raw = view_raw ('zone:4', 0, '_blank', 'http://sistersofbreastfeeding.com', '0', $phpAds_context);
$banner = $phpAds_raw['html'];
}
these are the errors:
Database error in vBulletin 3.5.0:
Invalid SQL:
SELECT
user.username, (user.options & 512) AS invisible, user.usergroupid,
session.userid, session.inforum, session.lastactivity,
IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid
FROM session AS session
LEFT JOIN user AS user ON(user.userid = session.userid)
WHERE session.lastactivity > 1128146372
ORDER BY username ASC;
MySQL Error : Table 'sisters_adserver.session' doesn't exist
Error Number : 1146
Date : Friday, September 30th 2005 @ 11:14:32 PM
Script : http://www.sistersofbreastfeeding.com/boards/index.php?
Referrer : http://www.sistersofbreastfeeding.com/boards/online.php?order=asc&sort=username&pp=20&page=1
IP Address : 24.16.63.220
Username : MrWee
Classname : vb_database
Database error in vBulletin 3.5.0:
Invalid SQL:
UPDATE session
SET lastactivity = 1128147272, location = '/boards/index.php?', inforum = 0, inthread = 0, incalendar = 0, badlocation = 0
WHERE sessionhash = '44b217e04e55e3ca3491ffed6ee9020b';
MySQL Error : Table 'sisters_adserver.session' doesn't exist
Error Number : 1146
Date : Friday, September 30th 2005 @ 11:14:33 PM
Script : http://www.sistersofbreastfeeding.com/boards/index.php?
Referrer : http://www.sistersofbreastfeeding.com/boards/online.php?order=asc&sort=username&pp=20&page=1
IP Address : 24.16.63.220
Username : MrWee
Classname : vb_database
Thanks in advance for your help
Kirk Y
10-01-2005, 02:28 PM
Yeah I use it on my site, I just didn't do a plugin, I modified global.php to include the PHP.
MrWee
10-01-2005, 05:11 PM
Thanks acidburn0520, I tried that as well and get the same result as when i add it as a plugin.
Kirk Y
10-01-2005, 05:22 PM
Hmm... that's strange.
includes/affiliate_include
<?php
//RANDOM AFFILIATES
if (@include(getenv('DOCUMENT_ROOT').'/forum/phpAdsNew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$randomaff = view_raw ('zone:2', 0, '_blank', '', '0', $phpAds_context);
}
//DIRECT (3D PROGZ)
if (@include(getenv('DOCUMENT_ROOT').'/forum/phpAdsNew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$progaff = view_raw ('', 2, '_blank', '', '0', $phpAds_context);
}
//DIRECT (HALOGRID)
if (@include(getenv('DOCUMENT_ROOT').'/forum/phpAdsNew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$haloaff = view_raw ('', 5, '_blank', '', '0', $phpAds_context);
}
//DIRECT (SOCOMSOURCE)
if (@include(getenv('DOCUMENT_ROOT').'/forum/phpAdsNew/phpadsnew.inc.php')) {
if (!isset($phpAds_context)) $phpAds_context = array();
$socomaff = view_raw ('', 6, '_blank', '', '0', $phpAds_context);
}
?>
global.php
// ################################################## ###########################
// Start initialisation
require_once(CWD . '/includes/init.php');
// affiliates
require_once('./includes/affiliate_include.php');
And then I just call them in my templates using the appropriate variable. You did all this correctly?
MrWee
10-01-2005, 07:35 PM
Hmm... that's strange.
And then I just call them in my templates using the appropriate variable. You did all this correctly?
Yes, like i said above, i literally copy and pasted the code that in used in the phpinclude_start template under 3.0.8. It worked fine in that version.
First i added it as a plugin wit hte global_start hook, then i tried adding it directly to global.php like you said.
Does the mysql error give anyone any ideas? it seem to be looking for a db table that doesn't exist, what in the code would cause this?
EDIT:
I found the solution in another thread:
https://vborg.vbsupport.ru/showpost.php?p=769940&postcount=74
Kirk Y
10-01-2005, 08:00 PM
Ahh... never would've thought of that. I couldn't figure it out, but glad to hear that it's now working for you.
Trana
10-06-2005, 08:17 PM
Can someone explain how to "upgrade" phpadsnew to use the new 3.5 modules/addon system? I have 3.0.7 with phpadsnew working fine, and I upgraded a test system to 3.5 and now my banner ad doesn't run.
I'm not too familiar with the 3.5 hooks so I was wondering if someone could explain what changes need to be done.
Thanks!
Can someone explain how to "upgrade" phpadsnew to use the new 3.5 modules/addon system? I have 3.0.7 with phpadsnew working fine, and I upgraded a test system to 3.5 and now my banner ad doesn't run.
I'm not too familiar with the 3.5 hooks so I was wondering if someone could explain what changes need to be done.
Thanks!
I need help too... hope to hear about vB 3.5 and phpadsnew integration so that I can get it into place.
Thanks
Yes, like i said above, i literally copy and pasted the code that in used in the phpinclude_start template under 3.0.8. It worked fine in that version.
First i added it as a plugin wit hte global_start hook, then i tried adding it directly to global.php like you said.
Does the mysql error give anyone any ideas? it seem to be looking for a db table that doesn't exist, what in the code would cause this?
EDIT:
I found the solution in another thread:
https://vborg.vbsupport.ru/showpost.php?p=769940&postcount=74
Thanks for posting the solution, that fixed it for me.
tgreer
10-11-2005, 02:16 PM
<a href="http://www.vbulletin.com/forum/showthread.php?t=156877" target="_blank">http://www.vbulletin.com/forum/showthread.php?t=156877</a>
RaceJunkie
10-11-2005, 02:24 PM
I paste the invocation code in my header is this ok?
www.localracechat.com
tgreer
10-11-2005, 04:49 PM
You can place the invocation code anywhere it makes sense to place it. Do this via a hook. I place mine in the "global_start" hook.
Then, you place the variable created by the invocation code, wherever you like. Header is fine. If you user the variable within a template used by a function (like the postbit template), you'll first have to declare the variable as global, also via the appropriate hook.
I explain all this in the link I provided.
dieselpowered
10-11-2005, 06:47 PM
Forgive the ignorant question, however, is there a benefit to using local invocation versus remote? I have the remote version in my header and it works fine??
www.atvpros.net
Thanks!
Sergio7889
11-15-2005, 06:45 PM
Well, i don't get any errors, but no banners show up!! Please help!
Zilvia
12-08-2005, 06:15 AM
Anyone willing to give any support on this?
I have one setup of this working great on a web host company for my website Boostaholic.org.
I set it up correctly and tried what seemed every other possible way to configure it on my hosted computer that runs my large website Zilvia.net and I cant get it to display. Any ideas?
Thanks!
Runner
01-10-2006, 12:59 AM
Hi,
if you still didn't know why it's not working when adding the code to global.php or as a plugin:
Set $phpAds_config['compatibility_mode'] to true in your config.inc.php of your phpadsnew installation.
mikexxx
01-16-2006, 05:54 PM
Phpadsnew Problem !!
Yesterday I had a problem with the server. I completely restored the server (Cobalt Raq550) to a fresh install. After that I restored the Backup (Im lucky the backup was only a few ours old) from the website and mysql.
The website works again. But there is a problem.
When a user Reply on a post it goes wrong. I give you two examples. This was working fine before I restored the server.
#1
Quick Reply > When clicking the send button Posting Quick Reply - Please Wait appears and noting else. When I refresh the page the post is made. So after the post is made the page will net refresh.
#2
When ik use the button Post Reply I go to the page newreply.php?do=
.. I type in a message and click Submit Reply then the next page cant be found? I get a IE error screen. Again if i go back to the tread the message is there.
After a lot of searching I fond the problem. If I disable the phpadsnew plugin (post #3) it is working fine !!
Can somebody please advice me.
imported_infitech
11-10-2006, 05:16 AM
isthis going to work in 3.6.3?
shunx91
01-20-2007, 08:17 PM
Hi Guys,
SOrry I've been trying to get phpadsnew to work on my site for 2 days alreayd and I can't figure out why it doesn't display the threads. I followed the directions and uploaded the plugin with the folloing code:
<?xml version="1.0" encoding="ISO-8859-1" ?>
- <plugins>
- <plugin active="1" product="vbulletin">
<title>PhPadsNew</title>
<hookname>global_start</hookname>
- <phpcode>
- <![CDATA[ // Ads
if (@include(getenv('DOCUMENT_ROOT').'/phpads/phpadsnew.inc.php'))
{
if (!isset($phpAds_context))
{
$phpAds_context = array();
$phpAds_raw = view_raw ('zone:1', 0, '', '', '0', $phpAds_context);
$phpAds_context2 = array();
$phpAds_raw2 = view_raw ('zone:2', 0, '', '', '0', $phpAds_context2);
$phpAds_context3 = array();
$phpAds_raw3 = view_raw ('zone:3', 0, '', '', '0', $phpAds_context3);
$phpAds_context4 = array();
$phpAds_raw4 = view_raw ('zone:4', 0, '', '', '0', $phpAds_context4);
$phpAds_context7 = array();
$phpAds_raw7 = view_raw ('zone:7', 0, '', '', '0', $phpAds_context7);
}
}
]]>
</phpcode>
</plugin>
</plugins>
My question right now is what do I do after this? I have zone 1 defined in phpadsnew with a couple of banners linked to it. Can someone tell me what I have to do after this?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.