PhpDig.net

Go Back   PhpDig.net > PhpDig Forums > Mod Requests

Reply
 
Thread Tools
Old 05-09-2004, 11:29 PM   #1
RaGe
Green Mole
 
Join Date: Apr 2004
Posts: 12
External Banner Systems That Are Keyword Controlled

Ok, this has been a headache and a half. Some search engines query passes the keywords to the engine like:

<INPUT TYPE=text name=q size=25 maxlength=255 value="{KEYWORDS}">

PhPDig, and several others including Google use:

<INPUT TYPE=text name=q size=25 maxlength=255 value="">

Now, where this causes a problem, at least for my feeble, non-PhP oriented mind, is when external programs such as adserver softwares rely on a Javascript keyword call such as:

<script language="Javascript" src="http://www.whateverwebsite.com/adserver/index.php?section=serve&action=1&q={KEYWORDS}">
</script>

I bet i've spent 60 hours trying to figure this out, Alvin and JyG are wizards at making PhPDig pass keywords to external scripts like PhPAdsNew but i cant grasp the examples they posted and they seem to be in rather high demand and arent on here much.
ECHO wont work in the middle of a Javascript call so i cant ECHO the $query_string into the code. q="> or q="'> ignores all keywords and brings back all ads regardless of what your search was for and SSI seems to contribute to global warming :S

Considering i'm a week behind figuring this out, i'm in a bit of a pickle. I will gladly reward whoever can resolve my delima. Charter, i have a feeling you're laughing your butt off and knew the answer before even getting to this closing statement. Throw me a rope wouldya?

[RAGE]
RaGe is offline   Reply With Quote
Old 05-11-2004, 12:36 PM   #2
RaGe
Green Mole
 
Join Date: Apr 2004
Posts: 12
It appears all i need is a sniplet of script to add to search_functions.php that will allow for a new tag in the html template called <phpdig:"whatever"/> that will call the java code below

This code works "perfectly" in the php header or footer, but not when added to the html template:




<script language="javascript">
<!--//

var keyword="<? echo $query_string; ?>"


// *** DO NOT EDIT BELOW THIS LINE *** //
//-------------------------------------//

document.write("<sc" + "ript language=\"javascript\" src=\"http://www.example.com/adr/index.php?section=serve&action=1&q=" + escape(keyword) + "\">");
document.write("</sc" + "ript>")
//-->
</script>

If we can make this Java called as a tag in the html template we have this issue resolved
RaGe is offline   Reply With Quote
Old 05-11-2004, 01:16 PM   #3
RaGe
Green Mole
 
Join Date: Apr 2004
Posts: 12
something else i found would work (if i knew how to do it) if you can attach header.php and footer.php, adding a column_right.php and embedding the script into it should also work since it works in the header and footer. Problem is it needs to be attached the same way the header and footer is, as a seperate php file. Thusfar i've searched Google for every combination of keywords imaginable trying to find a tutorial on how to impliment a column_right file like dozens of scripts use, not a single helpful tutorial.

Sure, i can include it, but where do you define where it goes and what the percentage of the page will be?

frustrated is my middle name
RaGe is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Banner ads liquidice Mod Requests 0 03-31-2005 01:03 AM
title and keyword christophe How-to Forum 3 01-09-2005 05:10 AM


All times are GMT -8. The time now is 02:39 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 2001 - 2005, ThinkDing LLC. All Rights Reserved.