4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: JCoster on April 28, 2007, 01:09:06 AM
-
Hi.
At the moment I display the URL of the image under the image on the image view page (details) with the code on the details template tag:
<textarea name="select1" rows="3" cols="50">
<a href="myurl"><img src="{image_path}"></a>
</textarea>
..where {image_path} is defined by a mod (can't remember which one) stated somewhere on these forums.
However, I would also like to display this code on the page directly after the image is uploaded which just says the name of the image and the image.
How can I do this?
Thanks.
-
i hope there is a solution to this..
-
Hmm yes me too, I'm still waiting for a response.
Would be really really useful if there was anyone who could help?>
-
I tried to play around with 4i this evening and have come up with a mod! Found it to be rather simple. A couple of steps and done!
Modification updated as on June 30 2007 and moved to the below page:
Mod: Display image path, link and BBCode after image upload
http://www.4homepages.de/forum/index.php?topic=17911.0
Changelog:
1. Added the BBCodes and Thumbnail links.
2. This Mod will now display the uploaded image as a thumbnail instead of a complete image on the uploaded page.
3. The Mod is more portable now and also finishes in just 2 steps.
4. Added a follow up mod to display the same codes on the details page.
Thanks all for your kind words which made me work on this mod further. :D
-
To be fair, you're a bit of a beast.
cheers- you genius.
-
Nice little mod!!
You may want to create a topic in "Mods & Plugins (Releases & Support) (http://www.4homepages.de/forum/index.php?board=15.0)" then include the bbcode part as well. I am sure many people would like to use it.
-
Thanks for this Mod
I made some changes on my own to add BBCode large linked image and BBCode Thumbnail linked image.
//Mod: UploadInfo
/**
* Get image information immediately after successful upload
* Contact: arjoon@gmail.com
*/
$sitename = "http://www.your-site-name.com"; // modify this to your site's name without any trailing slash
$cat_name = $cat_cache[$cat_id]['cat_name'];
$uploaded_image_path = $sitename."/data/media"."/".$cat_id."/".$new_name;
$uploaded_image_link = $sitename."/details.php?image_id=".$image_id;
$uploaded_thumbnail_path = $sitename."/data/thumbnails"."/".$cat_id."/".$new_name; // use this for generating BB code for forums
$uploaded_forum_code = "[URL=".$uploaded_image_link."][IMG]".$uploaded_image_path."[/IMG][/URL]";
$uploaded_thumb_code = "[URL=".$uploaded_image_link."][IMG]".$uploaded_thumbnail_path."[/IMG][/URL]";
$uploadinfo .= "<font size='2' face='Tahoma'><a href='".$sitename."/member.php?action=uploadform'><b>Upload another image</b></a>";
$uploadinfo .= "<hr color='#C0C0C0' width='80%' size='1'>";
$uploadinfo .= "Direct Path:<br /> <input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:0; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_path."' type='text' name='image'><br />";
$uploadinfo .= "Image Path:<br /> <input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:0; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_link."' type='text' name='image'></font><br /><br />";
$uploadinfo .= "BBCode with Full size Image:<br /> <input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:0; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_forum_code."' type='text' name='image'></font><br /><br />";
$uploadinfo .= "BBCode with Thumbnail Image:<br /> <input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:0; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_code."' type='text' name='image'></font><br /><br />";
$uploadinfo .= "<font size='1' face='Tahoma'>[ This image has to be validated by the admin before adding it to the site ]</font>"; // remove this line if you dont require validation
$content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$uploadinfo."\n</td>\n</tr>\n</table>\n";
//end of UploadInfo
-
Very nice impss, thanks!
-
lolz! thanks for the comments.. I plan to work on this mod to enhance it further :)
And thanks impss for the add-on.. i'll include this in the original and create a new topic in the Mod section :wink:
-
@ MaveriC: Good work!
-
Thanks kai!
Added another follow-up mod for people who'd like to continue the same image codes on the details page. The below mod can also be used as an individual mod to display image codes.
Mod: Display image codes on details page
http://www.4homepages.de/forum/index.php?topic=17912.0
Guess the little tweak which I did last week has come too far! :roll: :D