Author Topic: [SOLVED] Visit Site Script help  (Read 8049 times)

0 Members and 1 Guest are viewing this topic.

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
[SOLVED] Visit Site Script help
« on: September 28, 2008, 05:01:57 AM »
Hello,

this is my Step...

I put in (db_field_definitions.php)
Code: [Select]
$additional_image_fields['image_direktlink'] = array($lang['image_direktlink'], "text", 1);
I put in (lang/LNG/main.php)
Code: [Select]
$lang['image_direktlink'] = "Direktlink";
Then in my phpmyadmin put this:
Code: [Select]
ALTER TABLE `4images_images` ADD `image_direktlink` VARCHAR( 255 ) NOT NULL;
and then i put ({image_direktlink) in details.html like this)

Code: [Select]
<a href="{image_direktlink}"><img src="{template_url}/images/download.gif" width="98" height="28" /></a>
But this dont work
look here
« Last Edit: October 03, 2008, 04:19:14 AM by V@no »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Visit Site Script help
« Reply #1 on: September 28, 2008, 05:13:34 AM »
strange. can I see it?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: Visit Site Script help
« Reply #2 on: September 28, 2008, 01:21:15 PM »
You have a pn

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Visit Site Script help
« Reply #3 on: September 28, 2008, 05:19:28 PM »
Are you sure that for that image in image_direktlink you store just an address and not whole HTML code? It looks like in the database it saved as
Code: [Select]
<a href="http://sharebase.to/files/RwJTe4Nsns.html" target="_blank" rel="nofollow">http://sharebase.to/files/RwJTe4Nsns.html</a>
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: Visit Site Script help
« Reply #4 on: September 28, 2008, 05:46:02 PM »
How exactly do you mean? I have indicated quite normal fields. In the first contribution is yes what I did. If I then upload what can I enter a URL that means if someone on the download button clicks, he arrived at this page!

I wanted to like in this kind do with the Visit button
http://www.siteshot.at/go-and-show-me-more-details-for-siteshot-www.kloeppelparadies.de-and-ID-27.html

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Visit Site Script help
« Reply #5 on: September 28, 2008, 06:00:34 PM »
ok, when you edit that image in ACP, what is in the image_direktlink field?
is it:
1)
Code: [Select]
http://sharebase.to/files/RwJTe4Nsns.html

Or:
2)
Code: [Select]
<a href="http://sharebase.to/files/RwJTe4Nsns.html" target="_blank" rel="nofollow">http://sharebase.to/files/RwJTe4Nsns.html</a>
?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: Visit Site Script help
« Reply #6 on: September 28, 2008, 06:16:43 PM »
When i edit the image is it:
1)
Code: [Select]
http://sharebase.to/files/RwJTe4Nsns.html

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Visit Site Script help
« Reply #7 on: September 28, 2008, 06:38:33 PM »
in includes/functions.php find:
      $additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;

Replace it with:
      $additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 2) : REPLACE_EMPTY;

Or if you want to be safe from this change messing up other mods, you probably should instead of replacing that line add below:
      $additional_field_array[$key."_nourl"] = (!empty($image_row[$key])) ? format_text($image_row[$key], 2) : REPLACE_EMPTY;
and in details.html template use {image_direktlink_nourl} tag instead
« Last Edit: September 28, 2008, 07:33:23 PM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [SOLVED] Visit Site Script help - V@no is the best
« Reply #8 on: September 28, 2008, 07:17:33 PM »
WOW NICE DUDE!
V@no you are the best :D

thank you very very much!

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [SOLVED] Visit Site Script help - V@no is the best
« Reply #9 on: October 02, 2008, 11:24:31 AM »
Vano, the downloads are thus no longer counted, which is also very clear, but there is a possibility that I
  can use?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [SOLVED] Visit Site Script help - V@no is the best
« Reply #10 on: October 02, 2008, 02:48:50 PM »
Have you tried use image_download_url?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.806
  • I ♥ 4I
    • View Profile
Re: [SOLVED] Visit Site Script help - V@no is the best
« Reply #11 on: October 02, 2008, 02:59:14 PM »
No, i use only my new field!

Is it possible that the downloads are counted again?

What have I done:

I put in (db_field_definitions.php)
Code: [Select]
$additional_image_fields['image_direktlink'] = array($lang['image_direktlink'], "text", 1);
I put in (lang/LNG/main.php)
Code: [Select]
$lang['image_direktlink'] = "Direktlink";
Then in my phpmyadmin put this:
Code: [Select]
ALTER TABLE `4images_images` ADD `image_direktlink` VARCHAR( 255 ) NOT NULL;
in includes/functions.php find:
      $additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;

Replace it with:
      $additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 2) : REPLACE_EMPTY;
and below
 $additional_field_array[$key."_nourl"] = (!empty($image_row[$key])) ? format_text($image_row[$key], 2) : REPLACE_EMPTY;

In details.html i have add
Code: [Select]
<a href="{image_direktlink_nourl}"><img src="{template_url}/images/download.gif" width="98" height="28" /></a>This work perfektly....
But the download counter does not work!

I have found this in includes/function.php
Code: [Select]
    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
Im replace with
Code: [Select]
    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."{image_direktlink_nourl}".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";dont work
Code: [Select]
    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."image_direktlink_nourl".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";dont work
Code: [Select]
    $download_button = "<a href=\"".$site_sess->url(ROOT_PATH."".image_direktlink_nourl."".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
Please help!
« Last Edit: October 05, 2008, 03:41:31 PM by Phisker B »