Author Topic: Direct link to images  (Read 42338 times)

0 Members and 1 Guest are viewing this topic.

Offline TedAppleberry

  • Newbie
  • *
  • Posts: 30
    • View Profile
Direct link to images
« Reply #15 on: April 07, 2003, 06:02:48 AM »
Quote from: CBiLL
If your curious what it look like .. go to

http://www.findmall.com/4images/details.php?image_id=11&s=77bfbb48322980407817e0907a050cd4

and look under the lightbox / download icon


I still would like to try to get rid of the string after the filename extention.

Bill

Heh, I like that. Anyway to enable this only for special accounts? I disabled the right click feature but am now getting linked to from all over the place. I hate that.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Direct link to images
« Reply #16 on: April 07, 2003, 06:27:00 AM »
Quote from: TedAppleberry
Heh, I like that. Anyway to enable this only for special accounts? I disabled the right click feature but am now getting linked to from all over the place. I hate that.

only if u create new field in the USERS_TABLE in the database...
but also, u can try use this:
Code: [Select]
     "image_path" => ($download_image) ? $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", $media_src)))) : "",
that will show the link only where "download" is alowed
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 michi-w.

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: Direct link to images
« Reply #17 on: April 11, 2005, 01:45:15 AM »
Code: [Select]
"image_path" => $site_sess->url($script_url.(str_replace("./", "/",$media_src))),Very well, path works with jpg ending is indicated. 

Could I receive also for the Thumbnail path
Ask

I would like, which is indicated in such a way it.
Code: [Select]
[url=http://www.web-upload.de/data/media/54/upload.jpg][img]http://www.web-upload.de/data/thumbnails/54/thumbnail.jpg[/img][/url]
So far, so well
Code: [Select]
[url={image_path}][img]http://www.web-upload.de/data/thumbnails/54/thumbnail.jpg[/img][/url]

Gruß
michi-w.

Offline michi-w.

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: Direct link to images
« Reply #18 on: April 13, 2005, 11:36:52 AM »
Code: [Select]
[url={image_path}][img]http://www.web-upload.de/data/thumbnails/{cat_id}/{thumbnail_file_name}[/img][/url]

Offline michi-w.

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: Direct link to images
« Reply #19 on: May 09, 2005, 05:12:01 PM »
A little problem:

{image_path}

The path becomes Internet Explorer of direct path, but by the Firefox is it the session id path. I wont by the Firefox the direct path, too.

Gruß
michi-w.

Offline michi-w.

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: Direct link to images
« Reply #20 on: May 09, 2005, 08:28:02 PM »
only if u create new field in the USERS_TABLE in the database...

Can you make a update.php?

Please!

For the moment make it so, for direct path in details.html

1. open details.php
Code: [Select]
define('ROOT_PATH', './');to
Code: [Select]
define('ROOT_PATH', '');
2. in details.html
http://www.yourdomain.de/{media_src}


Offline littleteam

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Littleteam.de
Re: Direct link to images
« Reply #21 on: April 17, 2006, 11:21:08 PM »
but also, u can try use this:
Code: [Select]
      "image_path" => ($download_image) ? $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", $media_src)))) : "",that will show the link only where "download" is alowed
ähm .... in which file do I have to make theses changes?
trust no-one

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
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 littleteam

  • Newbie
  • *
  • Posts: 34
    • View Profile
    • Littleteam.de
Re: Direct link to images
« Reply #23 on: April 18, 2006, 10:46:22 AM »
thanks
trust no-one

Offline Jenn

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Direct link to images
« Reply #24 on: February 13, 2007, 03:37:00 AM »
Is this still good for the new version of 4images? If not, where can I get a mod that does this?

If it does, in the templates, how do I use the image path?

Offline CeJay

  • Sr. Member
  • ****
  • Posts: 425
    • View Profile
Re: Direct link to images
« Reply #25 on: February 13, 2007, 07:07:54 AM »
Is this still good for the new version of 4images? If not, where can I get a mod that does this?

If it does, in the templates, how do I use the image path?
It should as it worked in the last version.

Offline Jenn

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Direct link to images
« Reply #26 on: February 13, 2007, 12:43:27 PM »
ok, try this:

then in /templates/<yourtemplate>/details.html u can use {image_path}

I'm a bit confused on how to use this. When I use this, it just gives the path, thats it. See here I thought it would tur into a clickable copy and paste link for others to use on myspace?
http://www.hellonturf.com/4image/details.php?image_id=16&sessionid=f4eb766b0134f0c7d847547eb0ef360d

Also what code would I edit to make links appear as such:

<style>
.contactTable { width: 300px !important; height: 150px !important; padding: 0px !important; background-image: url('LINK TO IMAGE'); background-attachment: scroll; background-position: center center; background-repeat: no-repeat; background-color: transparent; }
.contactTable table, table.contactTable td { padding: 0px !important; border: 0px; background-color: transparent; background-image: none; }
.contactTable a img { visibility: hidden; border: 0px !important; }
.contactTable a { display: block; height: 28px; width: 115px; }
.contactTable .text { font-size: 1px !important; }
.contactTable .text, .contactTable a, .contactTable img { filter: none !important; }
</style><br><a href=LINK TO SITE='Myspace Layouts'>Myspace Contact Tables</a>

« Last Edit: February 13, 2007, 01:06:31 PM by Jenn »

Offline michi-w.

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: Direct link to images
« Reply #27 on: February 13, 2007, 01:56:33 PM »
ok, try this:
open /includes/functions.php
Find:
Code: [Select]
function get_media_codeone line down, in global add $script_url
then find:
Code: [Select]
"image_name" => $image_name,add after:
Code: [Select]
"image_path" => $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", preg_replace("/(\?.*)/", "",$media_src))))),

then in /templates/<yourtemplate>/details.html u can use {image_path}

My functions.php
Code: [Select]
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0) {
  global $site_template, $site_sess, $lang, $mode, $script_url;
$script_url :!:
and
Code: [Select]
$site_template->register_vars(array(
      "media_src" => $media_src,
      "media_icon" => $media_icon,
      "image_name" => $image_name,
      "image_path" => $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", preg_replace("/(\?.*)/", "",$media_src))))),

{image_path} in details.html results in  http://www.yoursite.com/4images/data/media/2/3-31-03h.jpg

No
<a href=LINK TO SITE='Myspace Layouts'>Myspace Contact Tables</a>

Yes
<a href="{image_path}" target="_blank" title="">Myspace Contact Tables</a>
« Last Edit: February 13, 2007, 02:18:16 PM by michi-w. »

Offline Jenn

  • Full Member
  • ***
  • Posts: 105
    • View Profile
Re: Direct link to images
« Reply #28 on: February 13, 2007, 02:16:56 PM »
Ok, this is what I have in my functions...

Quote
$site_template->register_vars(array(
      "media_src" => $media_src,
      "media_icon" => $media_icon,
      "image_name" => $image_name,
     "image_path" => $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", preg_replace("/(\?.*)/", "",$media_src))))),
      "width_height" => $width_height,
      "width" => $width,
      "height" => $height,
      "iptc_info" => $iptc_info,
      "exif_info" => $exif_info
    ));

I have this in my details
Quote
<div align="center">{admin_links}</div>
           
<p><br />
  {endif admin_links} </p>
<p align="center">{image_path}<br />
</p>

I take it I can add the image_path anywhere?

With those in place I still get the same result. Not sure what I am doing wrong...Since this just gives the URL, I'm thinking this is not what I wanted.

I am looking for something that will spit out the code needed to be used on myspace like the code I have listed above. Is this what this mod is for?

Offline michi-w.

  • Hero Member
  • *****
  • Posts: 505
    • View Profile
Re: Direct link to images
« Reply #29 on: February 13, 2007, 02:22:10 PM »
ok, try this:
open /includes/functions.php
Find:
Code: [Select]
function get_media_codeone line down, in global add $script_url

My functions.php
Code: [Select]
function get_media_code($media_file_name, $image_id = 0, $cat_id = 0, $image_name = "", $mode = "", $show_link = 0, $detailed_view = 0) {
  global $site_template, $site_sess, $lang, $mode, $script_url;
$script_url :!:


 :!:
Code: [Select]
<a href="{image_path}" target="_blank" title="">pic</a> :!:

List? No! The root path of the upload in details.htm

Look
http://www.web-upload.de/details.php?image_id=10
« Last Edit: February 13, 2007, 02:40:16 PM by michi-w. »