4images Forum & Community
4images Issues / Ausgaben => Installation, Update & Configuration => Topic started by: CBiLL on April 01, 2003, 04:20:11 PM
-
I am looking for a Galley site that allow my members to upload images and offer them a direct links to thier images to links them in forums.
I installed 4Images and it working great but I can't firgue out how to get a direct link to the image itself ie http://www.yoursite.com/4images/member?/image.jpg or something like that so they can post the image link in forum and only images would show up in the forum. I don't want the entire page to show up.
Is there a setting or something allowing members to link only images from 4Image Galley to thier forum or websites?
Also is there a setting to prevent anyone outside of domain name to link images at other sites?
Thank you
CBiLL
-
I installed 4Images and it working great but I can't firgue out how to get a direct link to the image itself ie http://www.yoursite.com/4images/member?/image.jpg or something like that so they can post the image link in forum and only images would show up in the forum. I don't want the entire page to show up.
The link would be:
/4images/data/media/category id number/image file name
Example:
/4images/data/media/2/sample.jpg
This requires the user take note of the category id number which might prove difficult for some.
Is there a setting or something allowing members to link only images from 4Image Galley to thier forum or websites?
Search the forums for "htaccess"
-
Can anyone write a small hack for me that will display like a full link or path to images under the actual images they are viewing to be able to copy and paste it in the forum from?
Something like this
IMAGE DISPLAY HERE
This Image path is at http://www.yoursite.com/4images/data/media/2/sample.jpg
So member can see the path box and copy paste from the path box .. I think this should be a fairly simple hack.
Will be a great addition to 4Image and have it enable / disable or viewable only by members settings etc etc
CBiLL
-
also, u can use download button.
if u didnt disable right click (by default its disabled), then just right click on download button and do "copy shortcut".
I dont know how this will work in others browsers then IE, but it works fine for me.
this way it also protect your site, by hiding actual path to the files.
-
How do you disable or enable the right click feature on 4Images? I looked and can't see to find the setting for it.
Also I don't care providing a direct image link to the images since the main reason I am installing a photo galley is to provide member on my host a image storage place to be able to link images on thier post or whatever they wish to use it for.
I still would like to have some kind of message under the image where it display the full path ie http://www.yoursite.com/whereisimage/2/image.jpg so member can copy and past the path in elsewhere ie forums IMG tags etc etc ..
Can anyone provide me a simple hack to have image path displayed?
Thank you
Bill
-
ok, try this:
open /includes/functions.php
Find:function get_media_code
one line down, in global add $script_url
then find: "image_name" => $image_name,
add after: "image_path" => $site_sess->url($script_url.(str_replace("./", "/",$media_src))),
then in /templates/<yourtemplate>/details.html u can use {image_path}
-
Wow it works great and almost there ... I love it.. but one thing .. is there a way to get rid of the remaning strings after the file extention displayed?
here an example what it's displaying now
http://www.yoursite.com/4images/data/media/2/3-31-03h.jpg?s=5dac2660fb96f5d224b77e325853750d
is there a way to code it so it does not show the
?s=5dac2660fb96f5d224b77e325853750d
after the .jpg extention?
So it would only show
http://www.yoursite.com/4images/data/media/2/3-31-03h.jpg
But it what I am looking for and I am very happy with it .. it just I wish the string after the .jpg doesn't show up .. I have members who wouldn't understand not to copy and paste the string after the .jpg ...
Thank for the great work .. hope you can give me an answer to correct that remaining little issue.
Bill
-
try change:
"image_path" => $site_sess->url($script_url.(str_replace("./", "/",$media_src))),
to this: "image_path" => $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", $media_src)))),
-
Still same thing .. showing the string after the extention :(
Bill
-
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
-
strange, it works just fine for me...
anyone else valuntier to play with regular expressions? ;)
-
ok, try this:
open /includes/functions.php
Find: Code:
function get_media_code
one line down, in global add $script_url
then find: Code:
"image_name" => $image_name,
add after: Code:
"image_path" => $site_sess->url($script_url.(str_replace("./", "/",$media_src))),
then in /templates/<yourtemplate>/details.html u can use {image_path}
Ok done all that and still same thing .. string appearing after the file extentions.
So next thing I did is
try change: Code:
"image_path" => $site_sess->url($script_url.(str_replace("./", "/",$media_src))),
to this: Code:
"image_path" => $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", $media_src)))),
Here what I have edited so far ..
}
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;
And also this
"media_icon" => $media_icon,
"image_name" => $image_name,
"image_path" => $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", $media_src)))),
"width_height" => $width_height,
"width" => $width,
"height" => $height,
I am still getting the strings after the file extentions .. You said it working for you? Are you saying it working on your host or your not seeing the strings after the filename extention at my link above I provided?
Bill
-
just a thought:
is your 4images integrated with some board?
what is that "s=sdfsadfsdf" ?
I never get this, I know that this shows on vBulletine board.
maybe in this query is in $media_src, not in $script_url...
anyway, lets try one more shot ;)
again change:"image_path" => $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", $media_src)))),
to this:"image_path" => $site_sess->url($script_url.(preg_replace("/(\?.*)/", "", str_replace("./", "/", preg_replace("/(\?.*)/", "",$media_src))))),
-
just a thought:
is your 4images integrated with some board?
what is that "s=sdfsadfsdf" ?
I never get this, I know that this shows on vBulletine board.
maybe in this query is in $media_src, not in $script_url...
Yes It's integrated with Invisionboard sharing the same member database instead of having them register twice. So is that what causing all those extra string then?
If that the case then .. :? is there a way to fix it or I need to remove the integrate hack from 4Images and ask my members to register at both the board and the 4Images? .. I just hate having to have more than 1 member database when I can share them all among to 1 database is why I am doing this..
8O
Hopefully there a way around to it.
Bill
-
I don't know why it posted it twice ..
Deleted duplicate post this one since it posted my posting twice.
-
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.
-
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: "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
-
"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.
[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
[url={image_path}][img]http://www.web-upload.de/data/thumbnails/54/thumbnail.jpg[/img][/url]
Gruß
michi-w.
-
[url={image_path}][img]http://www.web-upload.de/data/thumbnails/{cat_id}/{thumbnail_file_name}[/img][/url]
-
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.
-
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
define('ROOT_PATH', './');
to
define('ROOT_PATH', '');
2. in details.html
http://www.yourdomain.de/{media_src}
-
but also, u can try use this: "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?
-
http://www.4homepages.de/forum/index.php?topic=4907.msg20807#msg20807
-
thanks
-
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?
-
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.
-
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>
-
ok, try this:
open /includes/functions.php
Find:function get_media_code
one line down, in global add $script_url
then find:"image_name" => $image_name,
add after:"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
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
$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>
-
Ok, this is what I have in my functions...
$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
<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?
-
ok, try this:
open /includes/functions.php
Find:function get_media_code
one line down, in global add $script_url
My functions.php
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 :!:
:!:<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
-
Yep
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;
-
Thats why I was thinking or asking if this works with the new version of 4images or not.
-
I dont know, my version is 1.7.3
-
Got it working. It was missing a period .
Went through all the code and compared it to others..
Thanks for your help.
-
What would the code be that I need to add to the html file for this?
<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>
-
I couldnt remember if I asked this or not, looked through my posts and didnt see it. Thought I did but...
Is it possible say I have 10 categories..
On 3 of the categories, it uses a different direct image code then the others.
Can I specify somehow which categories I want to use a certain direct image code then the others?
Does that make sense?
I have seen other sites (not 4images) have this capability and really need to integrate it into mine.
I could always have ALL the codes on each image in every category but it would make the details page junky looking and over run with code.
-
is there anyway to do this for thumbnails?? im really in a rut
-
Right.
I'm using this mod and instaed of putting the {image_path} on my details page, I'm putting it on the individual file media extensions page, firstly so that it won't appear for movies (as code is incorrect) and secondly so that it will appear under the image immediately after the user uploads it.
However, one problem: on the page immediately after upload, it shows the path of the random image rather than the path of the image uploaded.
Any advice?
Cheers.
-
Still no one?? :(
-
Has anybody got this working in 1.7.7?
I've just upgraded and redone the edits but it's not working now.
-
... you can also use [MOD] Display image codes on details page (image permalink) ...
... http://www.4homepages.de/forum/index.php?topic=17912.0 ...
-
... you can also use [MOD] Display image codes on details page (image permalink) ...
... http://www.4homepages.de/forum/index.php?topic=17912.0 ...
Thank you :D