Author Topic: List images in editprofile  (Read 23744 times)

0 Members and 1 Guest are viewing this topic.

Offline Warz

  • Newbie
  • *
  • Posts: 44
    • View Profile
List images in editprofile
« on: April 13, 2008, 01:26:20 PM »
Hello,
I have installed this mod:
http://www.4homepages.de/forum/index.php?topic=19353.0

This mods list ALL images uploaded by the user in ONE page. When user has uploaded 1000 images, and view it takes HUGE server resources and LONG load time.

What I need is:
- Code to make this mod display 10 images at once, and a list so you can go to next page.
Example:
First view 10 images... Then under the images it says:
1,2,3,4,5,6...96,97,98

They click a page.
I also want users to be able to list images after last uploaded, or alphabeth.

Also, I would like to remove the lightbox button and comments under each image instead, and put the link to the image, example: http://img.com/details.php?image_id=115

How much money will I pay?
You post your offer in this topic, and I reply if I can agree

Payment options (you choose): Paypal or e-gold.
« Last Edit: April 22, 2008, 06:35:56 PM by Warz »

Offline asd.m

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Small fix on MOD needed
« Reply #1 on: April 14, 2008, 04:03:13 PM »
I think I can do it :)

jest tell me how much you'll pay for it
than I'm going to tell how many day it going to take :)
If u need any help
add me and I'll help u if I can :)

My email

4images@f7up.com

الى اية مساعده
اضفني على المسنجر

Offline Warz

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Small fix on MOD needed
« Reply #2 on: April 14, 2008, 09:49:27 PM »
30$?

Offline asd.m

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Small fix on MOD needed
« Reply #3 on: April 14, 2008, 11:08:13 PM »
o.k jest to make shore

Quote
- Code to make this mod display 10 images at once, and a list so you can go to next page.
Example:
First view 10 images... Then under the images it says:
1,2,3,4,5,6...96,97,98

I understand this

but

Quote
They click a page.
I also want users to be able to list images after last uploaded, or alphabeth.

Also, I would like to remove the lightbox button and comments under each image instead, and put the link to the image, example: http://img.com/details.php?image_id=115

could u explain those again :)   
If u need any help
add me and I'll help u if I can :)

My email

4images@f7up.com

الى اية مساعده
اضفني على المسنجر

Offline asd.m

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Small fix on MOD needed
« Reply #4 on: April 15, 2008, 07:04:48 AM »


I finish pages #

I make it in my page show 3 images than go to the other page and show 3 also
and u can change this to 10 or 9  and it's easy to change :)

If u need any help
add me and I'll help u if I can :)

My email

4images@f7up.com

الى اية مساعده
اضفني على المسنجر

Offline Warz

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Small fix on MOD needed
« Reply #5 on: April 15, 2008, 10:47:33 AM »
Excellent  :D

With removing lightbox and comment and add link I mean:

As you see by image you should make a link under each image. Obviously I did not get enough space to do that in this picture, but in form you can copy the url and even if the form is too small the text is still there...and by marking it from the beginning you may get the whole url.

If it's easier you could make some sort of under-popup appear that shows the full link while clicking on a button/link under the image. The reason with this feature is so that people can link to their image.

By listing after last added and alphabet I mean that user can choose:
List by date (from last added to first added) or (from first added to last added)
when they list by date it will appear in the order from page 1 last added picture or first added picture depending on which option they choose.
List by title
List images with title # first and then 0 and then a then b and so on, alphabetically and the other way, like first page show z y x w and so on...

Hope that makes some sense.

Offline asd.m

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Small fix on MOD needed
« Reply #6 on: April 15, 2008, 04:03:41 PM »
almost all of them are easy
and I can do them to day
but there is only one problem

the problem is with removing the  lightbox button and comments

I don't think that I can't remove them :)
I try many time and many ways but I didn't do it
I'm going to try again and see if I can do it :)

If u need any help
add me and I'll help u if I can :)

My email

4images@f7up.com

الى اية مساعده
اضفني على المسنجر

Offline mawenzi

  • 4images Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: Small fix on MOD needed
« Reply #7 on: April 15, 2008, 04:32:14 PM »
@asd.m
... use for this MOD a extra thumbnail_bit.html ...
... a copy of thumbnail_bit.html with a new name ... thumbnail_bit_profile.html ...
... and then you can edit the new thumbnail_bit_profile.html ... by removing {lightbox_button} {image_comments} a.s.o. ...
... so you can use the old thumbnail_bit.html in categories, search, new images a.s.o. ...

PS: ... in this way you can use many different "thumbnail_bits" on your gallery ... ;)
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 asd.m

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Small fix on MOD needed
« Reply #8 on: April 15, 2008, 04:38:22 PM »
thanks mawenzi  :)

I understand it very well :)

I'm going to try it :)
If u need any help
add me and I'll help u if I can :)

My email

4images@f7up.com

الى اية مساعده
اضفني على المسنجر

Offline asd.m

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Small fix on MOD needed
« Reply #9 on: April 15, 2008, 06:32:14 PM »
o.k :)

I finish it :)



I hope it's like what u need :)
If u need any help
add me and I'll help u if I can :)

My email

4images@f7up.com

الى اية مساعده
اضفني على المسنجر

Offline Warz

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Small fix on MOD needed
« Reply #10 on: April 15, 2008, 06:52:08 PM »
Excellent! Please post how to install the mod in this topic (might as well let others know) and send me your paypal/e-gold ID on PM.

Thanks a lot!
Warz

Offline asd.m

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Small fix on MOD needed
« Reply #11 on: April 15, 2008, 09:19:58 PM »
o.k :)

thanks for Warz 
he paid me on my paypal account

Now let me explain it :)

first of all after u do the modify in this mod
http://www.4homepages.de/forum/index.php?topic=19353.0

start this

1-
open member.php
after <?
add
Code: [Select]
if ( phpversion() >= "4.2.0"){
    extract($_POST);
    extract($_GET);
    extract($_SERVER);
    extract($_COOKIE);
}
search for
[/size][/color]
Code: [Select]
//-----------------------------------------------------
//--- Show uploaded images from edit profile ----------
//-----------------------------------------------------
add after
Code: [Select]
$ShowPageNo="9"; # Nomber of the image per page
$PageBreak="999"; # nember of pages show for the user

if ($action == "show_uploaded_images") {

// code to add the limit per page in mysql code
if ($Page=="") {$Page=1;}
$FromRecord=($Page-1)*$ShowPageNo;
// code to add the limit per page in mysql code //
if ($SortBy=="") {$sh = "i.image_date DESC";}
if ($SortBy==1) {$sh = "i.image_date DESC";}
if ($SortBy==2) {$sh = "i.image_date ASC";}
if ($SortBy==3) {$sh = "i.image_name DESC";}
if ($SortBy==4) {$sh = "i.image_name ASC";}

2. after

Code: [Select]
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 " . get_user_table_field("u.", "user_id") . " = i.user_id AND i.user_id = " . $user_info['user_id'] . " AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
ORDER BY i.image_date DESC

change it with

Code: [Select]
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 " . get_user_table_field("u.", "user_id") . " = i.user_id AND i.user_id = " . $user_info['user_id'] . " AND (i.cat_id NOT IN (".get_auth_cat_sql("auth_viewimage", "NOTIN").", ".get_auth_cat_sql("auth_viewcat", "NOTIN")."))
ORDER BY $sh LIMIT $FromRecord,$ShowPageNo

3.
search about

Code: [Select]
  if ($count > 0)  {
    $leftover = ($config['image_cells'] - $count);
    if ($leftover >= 1) {
      for ($f = 0; $f < $leftover; $f++) {
        $uploaded_images_from_edit_profile .= "<td width=\"".$imgtable_width."\">\n&nbsp;\n</td>\n";
      }
      $uploaded_images_from_edit_profile .= "</tr>\n";
    }
  }
  $uploaded_images_from_edit_profile .= "</table>\n";

add after

Code: [Select]
// count the number of the image of the user by his user id
$RowsNo = mysql_num_rows(mysql_query("SELECT * from " . IMAGES_TABLE . " i where user_id=i.user_id"));

$MaxPage=(Int) ((($RowsNo-1)/$ShowPageNo)+1);



for ($i=1 ;$i<=$MaxPage ; $i++)
{
if ($i>$PageBreak) {break;}
If ($i==$Page)
{
$no_uploaded_images_from_edit_profile .= "| $i ";
}
Else
{

if ($SortBy==""){$uurl = "| <a href='member.php?action=show_uploaded_images&Page=$i'>$i</a>";}
if ($SortBy!=""){$uurl = "| <a href='member.php?action=show_uploaded_images&Page=$i&SortBy=$SortBy'>$i</a>";}
$no_uploaded_images_from_edit_profile .= "$uurl";
}
}

4.2. search for

Code: [Select]
$uploaded_images_from_edit_profile .= $site_template->parse_template("thumbnail_bit");

change it with

Code: [Select]
$uploaded_images_from_edit_profile .= $site_template->parse_template("thumbnail_bit_profile");

5.search for

Code: [Select]
$site_template->register_vars("lang_uploaded_images_from_edit_profile", $lang['uploaded_images_from_edit_profile']);
$site_template->register_vars("uploaded_images_from_edit_profile", $uploaded_images_from_edit_profile);

add after

Code: [Select]
$site_template->register_vars("no_uploaded_images_from_edit_profile", $no_uploaded_images_from_edit_profile);

save the file

6. open includes/functions.php
search for

Code: [Select]
"image_url" => ($show_link) ? $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : "")) : "",

change it with

Code: [Select]
"image_url" => ($show_link) ? $site_sess->url("details.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&amp;mode=".$mode : "")) : "",

save the file

open
templates/ur-template/member_editprofile.html

search for

Code: [Select]
  <td class="head1">{uploaded_images_from_edit_profile}</td>

  </tr>
</table>

add afther

Code: [Select]
<FONT face='Times New Roman,arial, verdana, helvetica' size=3><b>{no_uploaded_images_from_edit_profile}
</b>
</FONT>
<p><b><a href="member.php?action=show_uploaded_images&Page=1&SortBy=1">A-B-C</a>
| <a href="member.php?action=show_uploaded_images&Page=1&SortBy=2">C-B-A</a> |
<a href="member.php?action=show_uploaded_images&Page=1&SortBy=3">1-2-3</a> |
<a href="member.php?action=show_uploaded_images&Page=1&SortBy=4">3-2-1</a><br />

save the file
make new html file in ur template
name it thumbnail_bit_profile
it's name will be
thumbnail_bit_profile.html

add in it

Code: [Select]
<!-- you wish detail page in a small javascript open window, use {thumbnail_openwindow} -->
{thumbnail}<br />
<b>{image_name}</b> {if image_is_new}<sup class="new">{lang_new}</sup>{endif image_is_new}
<br />

<br />
&nbsp;<p><input type="text" name="T1" size="20" value="http://www.domain.com/{image_url}"></p>

and change the http://www.domain.com to ur domain

save the file
and that's all :)

I Attach all the files to make it easy :)



[Nicky edit]
used [ code ] instead of [ php ] to post php codes.
« Last Edit: April 16, 2008, 05:18:55 PM by asd.m »
If u need any help
add me and I'll help u if I can :)

My email

4images@f7up.com

الى اية مساعده
اضفني على المسنجر

Offline asd.m

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: Small fix on MOD needed
« Reply #12 on: April 15, 2008, 09:28:40 PM »
if there is any problem plz tel me :)
If u need any help
add me and I'll help u if I can :)

My email

4images@f7up.com

الى اية مساعده
اضفني على المسنجر

Offline Warz

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: Small fix on MOD needed
« Reply #13 on: April 15, 2008, 09:42:25 PM »
Thank you very much!  :D I made it work but there are a few problems, could you fix this?:

First: Could you change it to display pages like this: 1,2,3,4,5,6,7,8...........999,1000,1001,1002,1003,1004
Because right now I have many pages and it doesn't look very good! See:

Second: What is that text says FONT face='Times New Roman,arial, verdana, helvetica' size=3>
Third: I didn't get the sort by title or date to work?
Last: when I click on another page, still same images displayed  :(

Thanks :)

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Small fix on MOD needed
« Reply #14 on: April 15, 2008, 09:52:24 PM »
hi asd.m,

very nice..
would you be so kind and use ['code'] instead of ['php'] for posting codes (without quotes of course) ...

THX!
cheers
Nicky
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 ...

nicky.net 4 4images
Signature stolen from mawenzi