Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MaveriC

Pages: [1] 2 3
1
thanks for the welcome Kai! :D

@ Omsky - I'll see if it can be done and nudge ya if done!

2
hello all, I am back on the forum after a really long break. I will be taking all your suggestions and requests. Thanks to all the guys who chipped in while I was away - Great work!

3
Extremely sorry for being offline for so long - got a new job and stuff! But I am currently working on an upgrade. Thanks to all the guys who chipped in for help and support.

4
thanks for the great mod! excellent one.. somethng 4images needed for a long time :)

I got one suggest though.. can we do away with the "cat" and "img" thing in the category and image URLs? Something clean like wordpress? Am gonna try this anyways coz i have a feeling it's easy..  :p

5
excellent mod.. shud be part of the next release.. :)

6
remove or uncomment this from the details.php file
Code: [Select]
    if ($comment_headline == "")  {
      $msg .= (($msg != "") ? "<br />" : "").$lang['headline_required'];
      $error = 1;
    }

7
just discovered that the below script is enough to automatically digg the current page..

Code: [Select]
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script>

8
Name: ImageCodes v1.0
Works on 1.7.4
Last updated: June 30 2007
Description:
Use this mod to add the image path, image link and BBCode as in UploadInfo v1.0 on your details page.

Check the UploadInfo mod here where you can display this code immediately after image upload:
http://www.4homepages.de/forum/index.php?topic=17911.0

To brief the mod again:
This mod will display the below image codes which we find on most image hosting services and picture galleries these days on the details page.

Image Codes:
1. Hot link for websites
2. Hot link for forums
3. Thumbnail code for websites
4. Thumbnail code for forums
5. Image link
6. Image path

Please take a backup of all the files before modifying the code

Step 1: (only for people who have not installed the UploadInfo mod)

Open templates/your template name/header.html

Add the below code anywhere inside the <head> tag

Code: [Select]
<script type="text/javascript">

function highlight(field) {
        field.focus();
        field.select();
}
</script>

Step 2:

Open templates/your template name/details.html

Add the below code where you want the image codes to appear.

Code: [Select]
{image_codes}
Step 3:

Open details.php

Find
Code: [Select]
$site_template->print_template($site_template->parse_template($main_template));
Above it, paste:
Code: [Select]

//-----------------------------------------------------
//--- ImageCodes v1.0 Begins --------------------------
//-----------------------------------------------------

// Mod: ImageCodes v1.0
// Version: 1.0
// Description : Get image path, link and bbcode on the details page
// Contact: arjoon@gmail.com
// Last update: June 30 2007

$sql = "SELECT image_media_file FROM ".IMAGES_TABLE." WHERE image_id= $image_id";
$image_codes = $site_db->query_firstrow($sql);

$new_name = $image_codes['image_media_file'];

      $uploaded_image_path = $script_url."/".MEDIA_DIR."/".$cat_id."/".$new_name;
      $uploaded_thumb_path = $script_url."/".THUMB_DIR."/".$cat_id."/".$new_name;
      $uploaded_image_link = $script_url."/details.php?image_id=".$image_id;
      $uploaded_thumb_hotlink = "<a href=\"".$uploaded_image_link."\"><img src=\"".$uploaded_thumb_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
      $uploaded_image_hotlink = "<a href=\"".$script_url."\"><img src=\"".$uploaded_image_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
      $uploaded_image_bbcode = "[URL=".$script_url."][IMG]".$uploaded_image_path."[/IMG][/URL]";
      $uploaded_thumb_bbcode = "[URL=".$uploaded_image_link."][IMG]".$uploaded_thumb_path."[/IMG][/URL]";
      $uploadinfo .= "<font size='2' face='Tahoma'><b>Image Codes:</b><br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_hotlink."' type='text' name='image'> Thumbnail for websites<br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_bbcode."' type='text' name='image'> Thumbnail for forums<br /><br />";
      $uploadinfo .= "<font size='1' face='Tahoma'>Use the below codes to post the full sized image on other websites or forums</font><br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_hotlink."' type='text' name='image'> Hotlink for websites<br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_bbcode."' type='text' name='image'> Hotlink for forums<br /><br />";
      $uploadinfo .= "<font size='1' face='Tahoma'>Share this image with your friends</font><br />";
      $uploadinfo .= "<input 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 />";
      $uploadinfo .= "<input 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 /></font>";
      $icodes .= "<table border=\"0\" width=\"500px\" align=\"center\">\n<tr>\n<td>\n".$uploadinfo."\n</td>\n</tr>\n</table>\n";

      $site_template->register_vars("image_codes", $icodes);

//-----------------------------------------------------
//--- end of ImageCodes v1.0 --------------------------
//-----------------------------------------------------

That's it! you'r done! :D

I guess am done for this weekend too :p any bugs, changes and suggestions are welcome as usual :)

9
Name: UploadInfo v1.0
Works on 1.7.4
Last updated: June 30 2007
Requirements: GD or any other image editor to create thumbnails on the fly

How this works:

Whenever a user uploads an image, 4images by default does not include any details apart from the image. This mod will display the below codes on the successful upload page just like any free image hosting service.

Apart from the code, the mod will display a thumbnail link to the image rather than the complete image.

Image Codes:
1. Hot link for websites
2. Hot link for forums
3. Thumbnail code for websites
4. Thumbnail code for forums
5. Image link
6. Image path

You can customize the mod to display the complete image and remove any of the above options. This mod should work with other mods and different 4images versions without any issues.

Here's the procedure:

Please take a backup of all the files before modifying the code

Step 1:

Open templates/your template name/header.html

Add the below code anywhere inside the <head> tag

Code: [Select]
<script type="text/javascript">

function highlight(field) {
        field.focus();
        field.select();
}
</script>

Step 2:

Open member.php

Find 
Code: [Select]
$content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n".$media."\n</td>\n</tr>\n</table>\n";
Replace with:
Code: [Select]
//-----------------------------------------------------
//--- UploadInfo v1.0 Begins --------------------------
//-----------------------------------------------------

// Mod: UploadInfo v1.0
// Version: 1.0
// Description : Display image path, link and bbcode after image upload
// Contact: arjoon@gmail.com
// Last update: June 30 2007

      $cat_name = $cat_cache[$cat_id]['cat_name'];
      $uploaded_image_path = $script_url."/".MEDIA_DIR."/".$cat_id."/".$new_name;
      $uploaded_thumb_path = $script_url."/".THUMB_DIR."/".$cat_id."/".$new_name;
      $uploaded_image_link = $script_url."/details.php?image_id=".$image_id;
      $uploaded_thumb_hotlink = "<a href=\"".$uploaded_image_link."\"><img src=\"".$uploaded_thumb_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
      $uploaded_image_hotlink = "<a href=\"".$script_url."\"><img src=\"".$uploaded_image_path."\" border=\"0\" alt=\"".$new_name."\"></a>";
      $uploaded_image_bbcode = "[URL=http://".$script_url."][IMG]http://".$uploaded_image_path."[/img][/URL]";
      $uploaded_thumb_bbcode = "[URL=http://".$uploaded_image_link."][IMG]http://".$uploaded_thumb_path."[/img][/URL]";
      $uploadinfo .= "<center><font size='1' face='Tahoma'>click on the above thumbnail for the full sized image</font><br /><br />";
      $uploadinfo .= "<font size='2' face='Tahoma'><a href='".$script_url."/member.php?action=uploadform&cat_id=".$cat_id."'><b>Upload another image</b></a> or goto <a href='".$script_url."/categories.php?cat_id=".$cat_id."'><b>".$cat_name."'s gallery</b></a></center><br />";
      $uploadinfo .= "<hr color='#C0C0C0' width='80%' size='1'>";
      $uploadinfo .= "<br />";
      $uploadinfo .= "<b>Image Codes:</b><br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_hotlink."' type='text' name='image'> Thumbnail for websites<br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_thumb_bbcode."' type='text' name='image'> Thumbnail for forums<br /><br />";
      $uploadinfo .= "<font size='1' face='Tahoma'>Use the below codes to post the full sized image on other websites or forums</font><br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_hotlink."' type='text' name='image'> Hotlink for websites<br />";
      $uploadinfo .= "<input onclick='highlight(this);' style='border-style:solid; border-width:1; padding:2; width: 300px; background-color:#FFFFFF; color:#000000' size='70' value='".$uploaded_image_bbcode."' type='text' name='image'> Hotlink for forums<br /><br />";
      $uploadinfo .= "<font size='1' face='Tahoma'>Share this image with your friends</font><br />";
      $uploadinfo .= "<input 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 />";
      $uploadinfo .= "<input 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 /></font>";
      // remove the below line if your site doesnt require image validation
      $uploadinfo .= "<center><font size='1' face='Tahoma'>[ This image may require validation before it actually appears on the gallery ]</font></center>";
      $content .= "<table border=\"0\" align=\"center\">\n<tr>\n<td>\n<a href='".$uploaded_image_link."'>".$media."</a>\n</td>\n</tr>\n</table>\n";
      $content .= "<table border=\"0\" width=\"500px\" align=\"center\">\n<tr>\n<td>\n".$uploadinfo."\n</td>\n</tr>\n</table>\n";

//-----------------------------------------------------
//--- end of UploadInfo v1.0 --------------------------
//-----------------------------------------------------

That's it! :D

If you want to use the same image codes on the details page as well, click below
http://www.4homepages.de/forum/index.php?topic=17912.0

If there are any bugs/changes/suggestions, do let me know.

10
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


11
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:

12
The Problem:

Scene 1.1
Whenever you edit/delete an image or a comment, the link takes you to the admin menu where you get a warning before deleting the image or the comment.

Scene 1.2

If I want to delete 20 images from 20 different galleries(1 from each gallery) then I need to visit the admin panel 20 times to confirm these deletions. I dont think so it's a wise idea to visit the admin panel so many times.

Possible Solution:

Instead, if we can have a check box under each thumbnail in the category view and an action drop down with options like "Delete selected images / Edit selected images / Edit comments on selected images / Delete comments on selected images" followed by a "Go!" button which will bring up a pop up option confirming the action.

Once we confirm it, a message should appear on the category page confirming the action or posting any errors. If there are no errors caught then the page should automatically refresh loading a fresh index of thumbnails.

Basically, I feel we should cut down on the number of times we visit the admin panel and some activities should be performed on the front end itself.

any suggestions or solutions will be much appreciated.

13
excellent mod! I was planning to work on this feature 2nite  :lol:

14
Try out this solution.. it resizes the uploaded image to a thumbnail and provides the url/link etc..  :)

http://www.4homepages.de/forum/index.php?topic=17911.0

15
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

Pages: [1] 2 3