4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: thunderstrike on November 07, 2007, 04:56:11 AM
-
This is MOD for see in details page - all relate upload image of each uploader (relate image of upload).
// Step 1
In details.php file,
find:
//-----------------------------------------------------
//--- Show Image --------------------------------------
//-----------------------------------------------------
$image_allow_comments = (check_permission("auth_readcomment", $cat_id)) ? $image_row['image_allow_comments'] : 0;
$image_name = format_text($image_row['image_name'], 2);
show_image($image_row, $mode, 0, 1);
add after:
//-----------------------------------------------------
//--- Show All Related Images By Uploader -------------
//-----------------------------------------------------
$sql1 = "
SELECT i.image_id, i.image_name, i.image_thumb_file, i.image_media_file, i.cat_id" . get_user_table_field(", u.", "user_name") . "
FROM (" . IMAGES_TABLE . " i, " . CATEGORIES_TABLE . " c)
LEFT JOIN " . USERS_TABLE . " u ON (" . get_user_table_field("u.", "user_id") . " = i.user_id)
WHERE i.image_active = 1 AND i.cat_id = c.cat_id AND i.image_id != " . $image_id . " AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
";
$result = $site_db->query($sql1);
$num_rows = $site_db->get_numrows($result);
if (!$num_rows) {
$uploader_related_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\"><tr class=\"imagerow1\"><td>";
$uploader_related_images .= $lang['no_new_images'];
$uploader_related_images .= "</td></tr></table>";
}
else {
$uploader_related_images = "<table width=\"".$config['image_table_width']."\" border=\"0\" cellpadding=\"".$config['image_table_cellpadding']."\" cellspacing=\"".$config['image_table_cellspacing']."\">";
$count = 0;
$bgcounter = 0;
while ($uploader_related_images_row = $site_db->fetch_array($result)) {
$user_name = format_text(trim(ucfirst($uploader_related_images_row[$user_table_fields['user_name']]), 2));
if ($count == 0) {
$row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;
$uploader_related_images .= "<tr class=\"imagerow".$row_bg_number."\">\n";
}
$uploader_related_images .= "<td width=\"".$imgtable_width."\" valign=\"top\">\n";
show_image($uploader_related_images_row);
$uploader_related_images .= $site_template->parse_template("thumbnail_bit");
$uploader_related_images .= "\n</td>\n";
$count++;
if ($count == $config['image_cells']) {
$uploader_related_images .= "</tr>\n";
$count = 0;
}
} // end while
if ($count > 0) {
$leftover = ($config['image_cells'] - $count);
if ($leftover >= 1) {
for ($f = 0; $f < $leftover; $f++) {
$uploader_related_images .= "<td width=\"".$imgtable_width."\">\n \n</td>\n";
}
$uploader_related_images .= "</tr>\n";
}
}
$uploader_related_images .= "</table>\n";
} // end else
$site_template->register_vars("lang_uploader_related_images", preg_replace("/" . $site_template->start . "user_name" . $site_template->end . "/siU", $user_name, $lang['uploader_related_images']));
$site_template->register_vars("uploader_related_images", $uploader_related_images);
unset($uploader_related_images);
// Step 2
In lang/english/main.php file,
add in top ?>:
$lang['uploader_related_images'] = "See other images uploaded by {user_name}";
// Step 3
In templates/your_template/details.html file,
find:
{admin_links}<br />
{endif admin_links}<br />
{lightbox_button} {postcard_button} {download_button} {download_zip_button}
</div>
<br />
add after:
{if uploader_related_images}
<table width="450" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="head1">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td class="head1" valign="top">{lang_uploader_related_images}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="head1">{uploader_related_images}</td>
</tr>
</table>
<br />
{endif uploader_related_images}
Finish.
-
I fix step 1 from 1st post (include me - I get trap for this MOD 8O :oops: :mrgreen:).
-
Not working
-
Not working
Please read step 6 of my signature.
« Last Edit: November 07, 2007, 10:19:25 PM by kai »
I take no responsible for other edit of admin in my post :!:
-
??? does the mod work in 1.7.4. can you post your code, this one is not working pretty easy to install but nothing shows up
-
??? does the mod work in 1.7.4.
Yes - is work with v1.7.4.
-
can you help???
-
I test this on fresh 4images install and is work 100%. If install today after my fix post, MOD is work good. If install before, please do step 1 again.
If problem is same, I no can reproduce.
-
Working, one thing how do I limit the picture to only 4-6
-
In details.php file,
find:
WHERE i.image_active = 1 AND i.cat_id = c.cat_id AND i.image_id != " . $image_id . " AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
add after:
ORDER BY i.image_date DESC
LIMIT 4
(no space after line).
Change 4 to value limit you want.
-
Thanks for your help :lol:
-
Hi Thunderstrike,
I just installed your MOD on a fresh gallery, but it seems not to be working. :roll:
We you click on a thumb to view an image, you get only the image you uploaded or it works randomly. That means you get not what you want.
I am working on 1.74.
-
you get only the image you uploaded
Is what I say on first post. :?
it works randomly
Ramdom ... ? I no get ... example ? (Step 4 of my signature)
-
I will make an example for you. Later :)
-
:x ATTENTION:
Installation of this MODis the best way to kill your server.
Never install this MOD if your 4homepages-site has many visitors.
I did this mistake 10 minutes ago: all websites (not only 4homepages-based) on the hole server were in down.
-
If true ... I create quick fix for this today.
-
Ok so for good ressource - edit step 3 -
Find:
{if uploader_related_images}
add before:
{if user_loggedin}
find:
{endif uploader_related_images}
add after:
{endif user_loggedin}
This reduce trafic for details page. ;)
-
Does this MOD use "cache" folder in the root 4images directory?
You can (I hope) to link users playlists with "cache" to reduce traffic for details page on MySQL database.
____________
The idea of this MOD is great: 4images script has no working playlists. The best way to increase daily amount of users: build playlists (for authors, depending on keywords or tags of an image on details.php page).
-
hi
work in version 1.7.4
thanks for this MOD
-
hi
i have this error
(http://www.imagehosting.com/out.php/t1434944_1.jpg) (http://www.imagehosting.com/out.php/i1434944_1.jpg)
the image girl at room is the image_id=2 (otro) and the direction bar show the image_id=1 (Princess room)
when doing click in the image http://localhost/4images/details.php?image_id=1
leaves the image http://localhost/4images/details.php?image_id=2
to me and not the one that corresponds thanks
thanks
-
Have a little problwm with this mod...
it works, true, but it shows not the OTHER pictures from UPLOADER, only the last uploaded Images to the gallery...
What I have to change to get it working????
I use 1.7.4
Thanks for helping me...
-
Have a little problwm with this mod...
it works, true, but it shows not the OTHER pictures from UPLOADER, only the last uploaded Images to the gallery...
What I have to change to get it working????
I use 1.7.4
Thanks for helping me...
Hum ... in details.php file,
[edit] - I find problem.
find:
WHERE i.image_active = 1 AND i.cat_id = c.cat_id AND i.image_id != " . $image_id . " AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
replace:
WHERE i.image_active = 1 AND i.cat_id = c.cat_id AND i.image_id NOT IN (" . $image_id . ") AND " . get_user_table_field("u.", "user_id") . " = i.user_id AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
is work right ?
-
hi
this MOD work with 4images 1.7.6 for the links or image it´s bad or change
Teaches changed pictures, if I want to watch the image of someone else, showing rises by the administrator, namely mine, the name of the image does not correspond to that is watching, the image is called DIY 7, the previous image called mistake and I DIY above the previous image.
image 7 call bricolage
(http://www.imagehosting.com/out.php/t1563763_7.jpg) (http://www.imagehosting.com/out.php/i1563763_7.jpg)
and you see after image in this photo
(http://www.imagehosting.com/out.php/i1563766_71.jpg) (http://www.imagehosting.com/out.php/i1563766_71.jpg)
after image not call bricolage you name is error
2- If I click from page categories in the image of this photo I taught rise by another user, but I am trying not to look
image 7_2 click in this photo and show other
(http://www.imagehosting.com/out.php/t1563778_72.jpg) (http://www.imagehosting.com/out.php/i1563778_72.jpg)
see this photo
(http://www.imagehosting.com/out.php/t1563781_73.jpg) (http://www.imagehosting.com/out.php/i1563781_73.jpg)
Everything is reversed ,Because.
thank
-
Yes, same bug :(
-
hi
i have this error
(http://www.imagehosting.com/out.php/t1434944_1.jpg) (http://www.imagehosting.com/out.php/i1434944_1.jpg)
the image girl at room is the image_id=2 (otro) and the direction bar show the image_id=1 (Princess room)
when doing click in the image http://localhost/4images/details.php?image_id=1
leaves the image http://localhost/4images/details.php?image_id=2
to me and not the one that corresponds thanks
thanks
This error also present in version 1.7.6.
This module is a bug!