Support Forums

Old 09-21-2006, 08:33 PM   #1
Senior Member from OHIO!
 
dawyatt's Avatar
 
Join Date: Mar 2006
Location: Sandusky, OH
Posts: 277
Rep Power: 18
dawyatt is on a distinguished road
Default can I run scripts in an content page?

I am attempting to create a separate page called "hot deals from our affiliates". I thought the best way would be to add another content page and just call it via a link or button...

I created a new content page in admin... the new page is
www.buckeye-classifieds.com/testsite/pages.php?page=6

I am using phpads new and create the invocation code/script. I then go to the modify area in the content page and select html mode. I copy the code/script and save... it then hangs...

I am using this script in my live site, but the only difference being I want it all on one page... currently in my live site I have 4 different areas where the affiliate ads appear on the home page....

I did one error that indicated the scripts were causing the systme to run slow and if I continue it could crash... wierd message...only recieve it once.

anyway... after all that, my question is this: can I use the following code (generated from phpadsnew) on a content page that was created via admin?:

Code:
<table width="100%"  border="1" cellpadding="0">
  <tr> 
    <td><script language='JavaScript' type='text/javascript' src='http://buckeye-classifieds.com/phpadsnew/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
   if (!document.phpAds_used) document.phpAds_used = ',';
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   document.write ("
Code:
http://buckeye-classifieds.com/phpadsnew/adjs.php?n=" + phpAds_random);
   document.write ("&what=zone:3");
   document.write ("&exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://buckeye-classifieds.com/phpadsnew/adclick.php?n=a3ac7a25' target='_blank'><img src='http://buckeye-classifieds.com/phpadsnew/adview.php?what=zone:3&n=a3ac7a25' border='0' alt=''></a></noscript>
</td>
    <td><script language='JavaScript' type='text/javascript' src='http://buckeye-classifieds.com/phpadsnew/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
   if (!document.phpAds_used) document.phpAds_used = ',';
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   document.write ("http://buckeye-classifieds.com/phpadsnew/adjs.php?n=" + phpAds_random);
   document.write ("&what=zone:6");
   document.write ("&exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://buckeye-classifieds.com/phpadsnew/adclick.php?n=a4e9b126' target='_blank'><img src='http://buckeye-classifieds.com/phpadsnew/adview.php?what=zone:6&n=a4e9b126' border='0' alt=''></a></noscript>
</td>
  </tr>
  <tr> 
    <td><script language='JavaScript' type='text/javascript' src='http://buckeye-classifieds.com/phpadsnew/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
   if (!document.phpAds_used) document.phpAds_used = ',';
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   document.write ("http://buckeye-classifieds.com/phpadsnew/adjs.php?n=" + phpAds_random);
   document.write ("&what=zone:5");
   document.write ("&exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://buckeye-classifieds.com/phpadsnew/adclick.php?n=ad5f72f9' target='_blank'><img src='http://buckeye-classifieds.com/phpadsnew/adview.php?what=zone:5&n=ad5f72f9' border='0' alt=''></a></noscript>
</td>
    <td><script language='JavaScript' type='text/javascript' src='http://buckeye-classifieds.com/phpadsnew/adx.js'></script>
<script language='JavaScript' type='text/javascript'>
<!--
   if (!document.phpAds_used) document.phpAds_used = ',';
   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
   document.write ("http://buckeye-classifieds.com/phpadsnew/adjs.php?n=" + phpAds_random);
   document.write ("&what=zone:4");
   document.write ("&exclude=" + document.phpAds_used);
   if (document.referrer)
      document.write ("&referer=" + escape(document.referrer));
   document.write ("'><" + "/script>");
//-->
</script><noscript><a href='http://buckeye-classifieds.com/phpadsnew/adclick.php?n=a7318e6c' target='_blank'><img src='http://buckeye-classifieds.com/phpadsnew/adview.php?what=zone:4&n=a7318e6c' border='0' alt=''></a></noscript>
</td>
  </tr>
</table>
__________________
The CEO & Boss!
_____________________________________
Current Version: V4.0.9 - Developer
________________________________
dawyatt is offline   Reply With Quote
Old 09-21-2006, 08:40 PM   #2
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,183
Rep Power: 59
juven14 is a jewel in the rough
Default

I think you can, I'm not sure what html is stripped out, but you should be able to add it in. Just be sure you use html view in the editor, just to be sure it doesn't rewrite any of your code.
__________________
TemplateCodes.com
juven14 is offline   Reply With Quote
Old 09-21-2006, 08:46 PM   #3
Senior Member from OHIO!
 
dawyatt's Avatar
 
Join Date: Mar 2006
Location: Sandusky, OH
Posts: 277
Rep Power: 18
dawyatt is on a distinguished road
Default

I did use the html view... and once it did rewrite my code, but now it looks fine in the html view mode, but when you call the page it only shows the table... hmmmm

__________________
The CEO & Boss!
_____________________________________
Current Version: V4.0.9 - Developer
________________________________
dawyatt is offline   Reply With Quote
Old 09-21-2006, 08:50 PM   #4
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,183
Rep Power: 59
juven14 is a jewel in the rough
Default

Can you view source from your browser and verify that the javascript wasn't written? Or have you already?
__________________
TemplateCodes.com
juven14 is offline   Reply With Quote
Old 09-21-2006, 09:01 PM   #5
Senior Member from OHIO!
 
dawyatt's Avatar
 
Join Date: Mar 2006
Location: Sandusky, OH
Posts: 277
Rep Power: 18
dawyatt is on a distinguished road
Default

okay... when you go to the actual page in my test site:
http://www.buckeye-classifieds.com/t...ges.php?page=6

You will see a 2x2 table as it is defined in the content page, via admin (html view), but the script is ignored... it should display four affiliate ads at a time...

If you do a view source of this page, it shows the script code, but it is not running...

BTW right below you will see the script running on my layout page...

I will keep diggin around... I just would like to keep this within a content page if possible...
__________________
The CEO & Boss!
_____________________________________
Current Version: V4.0.9 - Developer
________________________________
dawyatt is offline   Reply With Quote
Old 09-21-2006, 09:13 PM   #6
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,183
Rep Power: 59
juven14 is a jewel in the rough
Default

Looks like you've sorted it out. What was the trouble?
__________________
TemplateCodes.com
juven14 is offline   Reply With Quote
Old 09-21-2006, 09:21 PM   #7
Senior Member from OHIO!
 
dawyatt's Avatar
 
Join Date: Mar 2006
Location: Sandusky, OH
Posts: 277
Rep Power: 18
dawyatt is on a distinguished road
Default

well kind of ... I bypassed the phpadsnew code and pasted the code for each affiliate separately.. it seems to me it did not like the tables & scripts embedded within???

I really want to use the phpadsnew coding so I can track my affiliate clicks myself... but for now I may have to settle for putting them in separatly....

again I think it had something to do with the tables & scripts imbedded... that is not an educated guess!

I am going to keep playing around with the phpadsnew code since I can make all my affililiate changes there and not worry about it ...

so the mystery remains, but I am not paralyzed by it... just going use the work around for now...
__________________
The CEO & Boss!
_____________________________________
Current Version: V4.0.9 - Developer
________________________________
dawyatt is offline   Reply With Quote
Old 09-21-2006, 09:24 PM   #8
Moderator
 
 
Join Date: Mar 2006
Location: NJ/NYC Area
Posts: 2,183
Rep Power: 59
juven14 is a jewel in the rough
Default

I used the html based stuff that just had a plain image tag, but I wasn't doing anything fancy, but it worked quite well for me. I haven't used this script in some time though.

I think I should give up tonight, you see that up there - , but ... , but. lol
__________________
TemplateCodes.com
juven14 is offline   Reply With Quote
Old 09-22-2006, 08:59 AM   #9
Moderator
 
 
Join Date: Mar 2006
Posts: 4,246
Rep Power: 103
Lhotch is just really niceLhotch is just really nice
Default

I may be out in left field here, havent had my morning coffee and admittedly didnt read every word of the thread BUT content pages added from within admin are stored in a database. Because of this there may be a lot of tag escaping to make sure the data doesnt get taken out of context by the mysql server. Because of this and all the various characters used in scripts etc its not a very script fiendly method of page creation as you have found out.

I would probably just create a static page.
__________________
Larry.
(Please note: I am not a 68C employee. I am a customer and volunteer who helps with questions where I can and the forums spam free)

Set your site apart from the competition with one of my modules......
Google Map Module | You Tube Module | Google Calendar Module | Event Calendar Module

68 Classifieds Important Links
Customer Area | Issue Tracker | Knowledge Base | User Manuals
Lhotch is offline   Reply With Quote
Old 06-22-2007, 12:35 PM   #10
Member
 
 
Join Date: Feb 2007
Location: Ohio
Posts: 56
Rep Power: 11
VanWertAds*com is on a distinguished road
Default

Quote:
Originally Posted by Lhotch View Post
I may be out in left field here, havent had my morning coffee and admittedly didnt read every word of the thread BUT content pages added from within admin are stored in a database. Because of this there may be a lot of tag escaping to make sure the data doesnt get taken out of context by the mysql server. Because of this and all the various characters used in scripts etc its not a very script fiendly method of page creation as you have found out.

I would probably just create a static page.
Yea I was trying to use a java script on my home page for a banner script and I entered it into the html editor and it did not show up... So I had to settle with a standard image tag. Is there a way to update the html editor to allow scripts?
__________________
V3.1.5b Hosted
vanwertads*.com

"Do unto others as you would expect others to do unto you"
VanWertAds*com is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
page 2 of 2 not working GSP v3.1 Questions & Support 10 03-02-2007 07:00 PM
Problem getting page title flyingpylon v3.1 Questions & Support 5 10-19-2006 01:15 PM
Help with page content martini55 v3.0 Questions & Support 5 04-22-2006 09:09 AM
Text above page build HTML, CSS, and Design Help 7 04-21-2006 08:31 AM
Back Button Erases Previous Page Content garysmith v3.0 Questions & Support 0 04-13-2006 08:22 AM


All times are GMT -4. The time now is 11:27 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0