• [Mod] Display image codes on details page (image permalink) 5 0 5 1
Currently:  

Author Topic: [Mod] Display image codes on details page (image permalink)  (Read 172310 times)

0 Members and 1 Guest are viewing this topic.

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: [Mod] Display image codes on details page (image permalink)
« Reply #45 on: February 11, 2009, 04:45:52 PM »
Sorry, no clue. The BBCode is defined in the template (assuming you are using my modification), must be something you did wrong.
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 yesme

  • Jr. Member
  • **
  • Posts: 61
  • Yes for 4images!
    • View Profile
Re: [Mod] Display image codes on details page (image permalink)
« Reply #46 on: February 11, 2009, 05:01:45 PM »
I am sorry because I had made a mistake just now. Not insert the <input bla bla bla scripts in details.html. Furthermore, I had already edited in the previous post that I had successfully show up the input together.

:D And I feel that you are currently monitored this thread and quickly edited the previous post before you read it. But you are faster than me. LoL.

Everything works very well but may I know why it is not work as usual using {image_codes} only?

I have tested the original scripts 3 times previously before I made the serious one. The test webs are okay but the serious web is not ok. :?

Fyi, the serious web is installed with Ban Mod, Qucik Edit/Modify images Mod and Maintenance Page Mod. Hope I am not miss some mod installed. :)

Thank you.
Love 4images! @--^-----

Offline sigma.

  • Full Member
  • ***
  • Posts: 148
  • cydonian.com/potd
    • View Profile
    • sigma's gallery
Re: [Mod] Display image codes on details page (image permalink)
« Reply #47 on: February 14, 2009, 04:29:21 PM »
Anyone know how to reduce the size of the text within the text box fields?

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: [Mod] Display image codes on details page (image permalink)
« Reply #48 on: February 14, 2009, 05:59:42 PM »
Code: (HTML/CSS) [Select]
style="font-size: 10px;"
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 ajh287sjhsdbsdasd

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] Display image codes on details page (image permalink)
« Reply #49 on: February 16, 2009, 02:21:10 AM »
Hi Vano...

Thanks for this MOD, it's great!

I have it installed and it is working. I do have one question and was hoping you could help.

What tweaks do I need to make so that after ADDING an image:

1. the image that is viewable in the gallery is being served from my server
2. the {uploaded_image_path} {uploaded_thumb_path} {uploaded_image_link} {uploaded_file_name} {homepage} embed codes are being served from another site like Photobucket.

Right now, if I add an image I have no way of separating the two. Everything, depending on what URL I paste or if I upload from desktop, either defaults being hosted from my server or to Photobucket.

I'd like to be able to upload from my PC or by URL on my server, and have the permalinks display another image location of my choosing.

EXAMPLE:
4images gallery image: mydomain.com/data/media/1/backgrounda9id7.gif
permalinks: photobucketOrAnyOtherSite.com/albums/uu193/myaccount/backgrounds/funny/background1.gif

Any help is appreciated.

Thanks

I believe in unnecessary HTML code should NOT be used inside PHP code, simply because it's hard to adopt it to your template.
Here is a replacement for entire Step 3 that also gives support for remote images:

In details.php find:
show_image($image_row$mode01);


Insert above:
Code: [Select]
//-----------------------------------------------------
//--- ImageCodes v1.1 Begins --------------------------
//-----------------------------------------------------

// Mod: ImageCodes v1.1
// Version: 1.1
// Description : Get image path, link and bbcode on the details page
// Contact: arjoon@gmail.com
// Last update: August 15 2008

$site_template->register_vars(array(
  "uploaded_image_path" => str_replace("'", "&#39;", (is_remote($image_row['image_media_file']) ? $image_row['image_media_file'] : $script_url."/".str_replace(ROOT_PATH, "", get_file_path($image_row['image_media_file'], "media", $cat_id, 0, 0)))),
  "uploaded_thumb_path" => str_replace("'", "&#39;", (is_remote($image_row['image_thumb_file']) ? $image_row['image_thumb_file'] : $script_url."/".str_replace(ROOT_PATH, "", get_file_path($image_row['image_thumb_file'], "thumb", $cat_id, 0, 0)))),
  "uploaded_image_link" => $script_url."/details.php?".URL_IMAGE_ID."=".$image_id,
  "uploaded_file_name"  => str_replace("'", "&#39;", $image_row['image_media_file']),
  "homepage"   => $script_url."/index.php"
));
//-----------------------------------------------------
//--- end of ImageCodes v1.1 --------------------------
//-----------------------------------------------------

After that in Step 2 instead of using {image_codes} you'll have more control over your design, you can use these new tags:
{uploaded_image_path} - full image path
{uploaded_thumb_path} - thumbnail image path
{uploaded_image_link} - url to image details page
{uploaded_file_name} - image filename
{homepage} - site homepage url

i.e.
Code: [Select]
<table border="0" width="500px" align="center">
  <tr>
    <td>
      <font size="2" face="Tahoma"><b>Image Codes:</b></font><br />
      <input onfocus='highlight(this);' onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='<a href="{uploaded_image_link}"><img src="{uploaded_thumb_path}" border="0" alt="{uploaded_file_name}"></a>' type='text' name='image'> Thumbnail for websites<br />
      <input onfocus='highlight(this);' onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='[URL={uploaded_image_link}][IMG]{uploaded_thumb_path}[/IMG][/URL]' type='text' name='image'> Thumbnail for forums<br /><br />
      <font size='1' face='Tahoma'>Use the below codes to post the full sized image on other websites or forums</font><br />
      <input onfocus='highlight(this);' onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='<a href="{homepage}"><img src="{uploaded_image_path}" border="0" alt="{uploaded_file_name}"></a>' type='text' name='image'> Hotlink for websites<br />
      <input onfocus='highlight(this);' onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='[URL={homepage}][IMG]{uploaded_image_path}[/IMG][/URL]' type='text' name='image'> Hotlink for forums<br /><br />
      <font size='1' face='Tahoma'>Share this image with your friends</font><br />
      <input onfocus='highlight(this);' onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='{uploaded_image_link}' type='text' name='image'> Share this image<br />
      <input onfocus='highlight(this);' onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='{uploaded_image_path}' type='text' name='image'> Direct path to image<br /><br />
    </td>
  </tr>
</table>

Offline Marcovich

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
    • High Definition Wallpapers
Re: [Mod] Display image codes on details page (image permalink)
« Reply #50 on: April 06, 2009, 03:34:24 PM »
Am on my iceberg skin its didnt work..
Can you helpo me out?

worldce

  • Guest
Re: [Mod] Display image codes on details page (image permalink)
« Reply #51 on: April 13, 2009, 09:02:23 PM »
i tried embed code for swf files. it worked. but  how can i do "width height". can you help me pls.

$uploaded_image_embed = "<embed src=\"".$uploaded_image_path."\" pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" {width_height} wmode=\"transparent\"></embed>";

$uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; border-color:#dfdfdf; padding:0; width: 330px; background-color:#ffffff; color:#666666' size='70' value='".$uploaded_image_embed."' type='text' name='image'><br />";






Offline GaYan

  • Sr. Member
  • ****
  • Posts: 301
  • ♫ | G2 | ♫
    • View Profile
    • Ziramagic
Re: [Mod] Display image codes on details page (image permalink)
« Reply #52 on: April 16, 2009, 12:10:34 PM »
i followed every thing .. but i coungt get the links in to my details.php page ... heres ma web link * http://www.nuwaragedara.com/wallpaper/
please .. can some 1 help me ?
I'm Back :)

Offline Eagle Eye

  • Full Member
  • ***
  • Posts: 191
    • View Profile
Re: [Mod] Display image codes on details page (image permalink)
« Reply #53 on: April 17, 2009, 06:08:58 AM »
People who has implement this mod noticed what kind of links you are getting for "Use the below codes to post the full sized image on other websites or forums" ??

When i tested, i get the image preview correct.. but the link back is not to the image shown, but to the site root.

Anyone getting similar results?

Solved: Just replace {homepage} with {uploaded_image_link}
« Last Edit: April 17, 2009, 07:02:23 AM by maxpaul »

Offline nemonic-berg

  • Newbie
  • *
  • Posts: 15
  • wallpapers
    • View Profile
    • free wallpaper - avatar download
Re: [Mod] Display image codes on details page (image permalink)
« Reply #54 on: June 05, 2009, 07:41:35 PM »
Am on my iceberg skin its didnt work..
Can you helpo me out?

hello same as me..my bug error seems on my diffrent template which is "iceberg"

error says

Code: [Select]
Parse error: syntax error, unexpected T_VARIABLE in /home/username/public_html/includes/template.php(101) : eval()'d code on line 1
anybody know how to fix this

thanks in advance whos helping me..


Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] Display image codes on details page (image permalink)
« Reply #55 on: June 05, 2009, 08:39:55 PM »
@nemonic-berg

... try to search for your request ...
... and you will find the answer ...
... http://www.4homepages.de/forum/index.php?topic=23072.0 ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline nemonic-berg

  • Newbie
  • *
  • Posts: 15
  • wallpapers
    • View Profile
    • free wallpaper - avatar download
Re: [Mod] Display image codes on details page (image permalink)
« Reply #56 on: June 06, 2009, 02:40:49 PM »
@nemonic-berg

... try to search for your request ...
... and you will find the answer ...
... http://www.4homepages.de/forum/index.php?topic=23072.0 ...

hello mawenzi...
sorry about not searching first bout this issue.
wha...maybe i will going to chance my template to a standart 4image theme....

once again thanks for the information  :)


Offline harinezumi

  • Newbie
  • *
  • Posts: 11
    • View Profile
Re: [Mod] Display image codes on details page (image permalink)
« Reply #57 on: June 25, 2009, 08:33:28 AM »
Hi! Thanks for a great mod!

Unfortunately my problem with this mod is that sometimes permalinks do not appear on details page for uploaded files. I tried to figure out the "rule" and that's what I get:
- for pictures from my camera permalinks are always present (*.jpg)
- for uploaded pictures which were previously saved from the internet permalinks are almost always missing (*.jpg and *.jpeg)
- for uploaded files of other formats (*.doc and *.pdf) permalinks are missing

What could be the reason for such strange behaviour?
Thanks!

Offline Ersen

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: [Mod] Display image codes on details page (image permalink)
« Reply #58 on: September 13, 2009, 12:53:26 PM »
Hello Maverick,

i saw your this post: http://www.4homepages.de/forum/index.php?topic=17912.0

First of all. Thank you and congrats. This is great. I did this but i have a question.

How can i add image codes in member upload form?

i added function code in  header,
i added {image_codes} in member.html
i find this code:   

$site_template->print_template($site_template->parse_template($main_template));

and above it paste,

ImageCodes v1.0 Begins......................

But this is not work. How can i fix this? Thanks

using 1.7.7 version.

Offline Sun

  • Jr. Member
  • **
  • Posts: 96
    • View Profile
Re: [Mod] Display image codes on details page (image permalink)
« Reply #59 on: September 30, 2009, 10:53:21 AM »
I use MOD Language select. Could anybody help me to add information about language into image codes(if you look on english page then codes for english, if russian - for russian)? My php knowledge is not good for create it by myself.

PS I use V@no's modification of this mod.
Tatyana.
I use 4images v.1.7.6
You can answer me in English and Russian languages.
Sorry, my English is not very good.