<? DEW-CODE.COM  

Downloads

Assorted scripts  (1)
DewNewPHPLinks  (9)





Lost Password?
No account yet? Register

Dew-Code Newsfeed

Resources


 USdigitalcable.com

Dew-Code
Welcome, Guest
Please Login or Register.    Lost Password?
Re:2 questions (1 viewing) (1) Guest
Go to bottom Post Reply Favoured: 0
TOPIC: Re:2 questions
#1581
derksj (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
2 questions 1 Year, 3 Months ago Karma: 0  
Hi Dew

http://www.vakantiehuizengids.com/index.php?action=page_display&PageID=10

First i want to know how i can replace the thumbshot image by powerd by http://www.dew-code.com
I not want to see the picture
Maybe it was ok before but i messed it up and dont know where to fine the powered by line

second: if i click on a link in my directory then the page goes back to the directory list (it should go to the url target blank

I use an iframe maybe thats the problem?

Greetings
Jurgen
 
Report to moderator   Logged Logged  
 
Last Edit: 2011/01/26 08:05 By derksj.
  The administrator has disabled public write access.
#1583
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:2 questions 1 Year, 3 Months ago Karma: 9  
Regarding Thumbshots, the powered by image is required to use their free service. See FAQ entry #9 here http://www.thumbshots.com/Support/FAQ.aspx

The second issue.. first make sure you have Base URL and Base path set correctly in the admin configurations panel.

From what I can see, you should have
Base URL = http://www.vakantiehuizengids.com
Base path = /links

If that is correct, then you may need to edit the includes/functions.php file a bit.

First, make a backup copy of /includes/functions.php

Looking through the draw_sites_function which starts around line # 1140 (likely different for your version) find mentions of the tracking file "out.php"

Since the actual out.php file sits in your /links directory, "./out.php" needs to be changed to "/links/out.php"

You should find 2 mentions of out.php, one for the site preview pic/link, and one for the text Site name link.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1584
derksj (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:2 questions 1 Year, 3 Months ago Karma: 0  
Thx Dew

I got the link working now the way you said it
But if i click on the picture it will not open as a new window but it openes in my frame

There is also a error alert on the left corner of my browser that say

"sign constant not ended"

Code:

$htmlsrc .= $main_table . "<tr "; if ($thumbshot == "1"){$htmlsrc .="height=\"90\"> <td valign=\"top\" width=\"120\" class=\"" . $cell_color . "\" background=./images/na.gif> <a target='blank' href=\"" . $sites_array['site_url'] . "\" onclick=\"location.href='/links/out.php?ID=" . $sites_array['site_id'] ."';return false;\">"; $htmlsrc .="<img border=\"0\" align=\"top\" src=http://open.thumbshots.org/image.pxf?url=". urlencode($sites_array["site_url"]) ."></a></td><td valign=\"top\" class=\"" . $cell_color . "\">"; }else{ $htmlsrc .="><td valign=\"top\" width=\"99%\" class=\"" . $cell_color . "\">"; $htmlsrc .= "<img border=\"1\" src=\"./images/flags/".$sites_array["country"] . "\""; $htmlsrc .= " hspace=\"5\" alt=\""; $short_entry = eregi_replace(".gif", "", $sites_array["country"]); $short_entry = eregi_replace("_", " ", $short_entry); $htmlsrc .= $short_entry . "\" title=\"" . $short_entry . "\" />"; } $htmlsrc .= "<a target=\"blank\" class=\"siteName\" href=\"" . $sites_array['site_url'] . "\" onclick=\"location.href='/links/out.php?ID=" .$sites_array[site_id] ."\';return false;\">"; //$htmlsrc .= "<a target=\"blank\" class=\"siteName\" href=\"" . $sites_array['site_url'] . "\" onClick=\"javascript:window.open(\'out.php?ID=" .$sites_array['site_id'] ."\');return false;\">"; $htmlsrc .= stripslashes($sites_array["site_name"]) . "</a>"; //$htmlsrc .= "&nbsp;&nbsp;&nbsp;<font class=\"siteURL\">"; //$htmlsrc .= $sites_array["site_url"] . "</font>"; $htmlsrc .= "&nbsp;&nbsp;<a class=\"ownerLink\" "; $htmlsrc .= "href=\"./directory/owner.html?"; if ($usesession =="yes"){$htmlsrc .= "". session_name()."=".session_id() ."&amp;";} $htmlsrc .= "ID=". $sites_array["site_id"] . "\">" . $functions_11 . "</a>"; $htmlsrc .= "&nbsp;&nbsp;<a class=\"reviewLink\" "; $htmlsrc .= "href=\"./directory/review.html?";
Greetings Jurgen
 
Report to moderator   Logged Logged  
 
Last Edit: 2011/01/27 01:57 By derksj.
  The administrator has disabled public write access.
#1585
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:2 questions 1 Year, 3 Months ago Karma: 9  
The only thing I spot is . . . .

Code:

$htmlsrc .= "<a target=\"blank\" class=\"siteName\" href=\"" . $sites_array['site_url'] . "\" onclick=\"location.href='/links/out.php?ID=" .$sites_array[site_id] ."\';return false;\">";
because the line uses double quotes to define the variable $html, double quotes within it need to be escaped. But single quotes do not need to be escaped. Try that last line without escaping the single quote in it
Code:

$sites_array[site_id] ."';return false;\">";
Also, I usually use target="_blank" with an underscore, which I think is universally understood by all browsers to open a new window, but either should work.
 
Report to moderator   Logged Logged  
 
Last Edit: 2011/01/27 08:48 By Dewed.
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
#1588
derksj (User)
Fresh Boarder
Posts: 5
graphgraph
User Offline Click here to see the profile of this user
Re:2 questions 1 Year, 3 Months ago Karma: 0  
Hi Dewed

Thanx for your answer

Your answer helped and the error is gone

The _blank answer did however not work

all targets are now _blank but the click on the picture still not opens in a new window

Greetings
Jurgen
 
Report to moderator   Logged Logged  
  The administrator has disabled public write access.
#1589
Dewed (Admin)
Admin
Posts: 605
graph
User Online Now Click here to see the profile of this user
Dew-Code.com
Re:2 questions 1 Year, 3 Months ago Karma: 9  
Ok, since I'm not big fan of frames, I never discovered this issue, but I may have a solution. Unfortunately I'm not a java script guru so I can't give a functional example.. but

Now, the image and site name links use . . .
Code:

onclick="location.href='/links/out.php?ID=
To force a new window for java script enabled browsers (which is what is used to tally outbound clicks) call java script's window.open function instead of location.href
Code:

onClick="javascript:window.open(\'/links/out.php?ID=\');
of source you need to append the $ID variable so the output is out.php?ID=9 and I'm afraid I'm currently to busy to look up exactly where that edit is needed. Make back ups, and hopefully what I've posted and Google will get you what you need.
 
Report to moderator   Logged Logged  
 
Nothing to it but to Dew it !
Dew-Code.com
  The administrator has disabled public write access.
Go to top Post Reply
get the latest posts directly to your desktop
Outsource your projects to thousands of programmers at
ScriptLance.com
Newsflash
Interested in
advertising?

This space for rent!

Sign up for PayPal and start accepting credit card payments instantly.
Copyright Dew-Code 2008