Author Topic: Volle Pfadangabe  (Read 6175 times)

0 Members and 1 Guest are viewing this topic.

Offline Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Volle Pfadangabe
« on: September 23, 2010, 05:31:27 PM »
Hallo,

@V@no: Rembrandt meinte du könntest mir sicher helfen ;)

Folgendes problem:

Meine links werden immer so dar gestellt:

Code: [Select]
<img src="./data/media/406/bild.jpg">
Google übernimmt jedoch diese art von Links nicht im system.

Wie kann ich daraus

Code: [Select]
<img src="www.domain.com/data/media/406/bild.jpg">
machen?

ich habe schon in der constant.php den pfad geändert:

Code: [Select]
// If 4images has problems to find out the right URL, define it here.
define('SCRIPT_URL', 'http://www.pj-firepower.com/picgallerie');

Das hat jedoch nichts gebraucht.

Ich hab vor 2 Monaten extra Search Engine Friendly URLs aka Short URLs" und "Google Friendly Urls For 4images Best Seo Mod installiert.
Das hat jedoch nichts gebracht...

nun hab ich update gemacht und bevor ich die mods installiere möchte ich wissen wie ich das problem mit dem absoluten pfad lösen kann....

vieleicht kann mir ja sonst jemand helfen.

Edit: ich hab jetzt nen mühseligen weg gefunden, in der functions.php

Code: [Select]
    $postcard_button = "<a href=\"http://www.pj-firepower.com/picgallerie/".$site_sess->url("postcards.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\"><img src=\"".get_gallery_image("postcard.gif")."\" border=\"0\" alt=\"\" /></a>";
da habe ich bei den "" einfach meine Adresse eingefügt, und bei "postcards.php?".... einfach das ROOT_PATH.

nur ist es ein sehr aufwendiger weg... gibts denn keine alternative ?

Danke !

mfg
Nosferatu
« Last Edit: September 23, 2010, 05:46:29 PM by Nosferatu »

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: Volle Pfadangabe
« Reply #1 on: September 23, 2010, 05:53:28 PM »
not tested.

In includes/functions.php find:
    return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#\.(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" $path) : $return_code;

Replace it with:
    return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#\.(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : (defined("SCRIPT_URL") ? str_replace("./"""SCRIPT_URL "/" $path) : $path)) : $return_code;
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 Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Re: Volle Pfadangabe
« Reply #2 on: September 23, 2010, 08:41:09 PM »
fine thx it works with that image file.

but i have now 2 more questions ;)

1) if i have bmp, avi, mpg, ...... files

Do i need to add this in the code ?

Code: [Select]
($in_admin && !preg_match("#\.(gif|jpg|jpeg|png)$#
2) it only works for the gif, jpg, ....

how can i set it for all links on gallery ? i need that for all

Code: [Select]
a href="./categories.php?cat_id=206" class="maincat">
That way it works too:
Code: [Select]
   $postcard_button = "<a href=\"http://www.pj-firepower.com/picgallerie/".$site_sess->url("postcards.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : ""))."\"><img src=\"".get_gallery_image("postcard.gif")."\" border=\"0\" alt=\"\" /></a>";
or is that an easier way to set it autmatic for all links on page ?

thx


Offline Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: Volle Pfadangabe
« Reply #3 on: September 25, 2010, 02:35:01 AM »
Wie muss das denn für die Big Ordner heißen

return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" $path) : (($image_type != "big") ? $return_code "");

LG
Danke Harald




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: Volle Pfadangabe
« Reply #4 on: September 25, 2010, 02:52:51 AM »
pretty much the same way:

return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : (defined("SCRIPT_URL") ? str_replace("./"""SCRIPT_URL "/" $path) : $path)) : (($image_type != "big") ? $return_code "");
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 Jan-Lukas

  • Addicted member
  • ******
  • Posts: 1.289
    • View Profile
    • Discover the New World of Kindersurprise
Re: Volle Pfadangabe
« Reply #5 on: September 25, 2010, 08:09:50 PM »
Big thanks
Danke Harald




Offline Nosferatu

  • Full Member
  • ***
  • Posts: 230
    • View Profile
    • Project-Firepower
Re: Volle Pfadangabe
« Reply #6 on: December 11, 2010, 12:13:13 PM »
i updatet it to new version 1.7.9

and replace it with your code in function.php

return ($check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#\.(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" : (defined("SCRIPT_URL") ? str_replace("./"""SCRIPT_URL "/" $path) : $path)) : $return_code;

but it doesn't work  in new version

why?

please help

thx !

Nosferatu