Author Topic: user_email in top.php  (Read 3662 times)

0 Members and 1 Guest are viewing this topic.

Offline masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
user_email in top.php
« on: February 11, 2008, 06:43:42 PM »
hi

how cant show user_email on top.php

thanks
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: user_email in top.php
« Reply #1 on: February 11, 2008, 07:13:52 PM »
... add the following in every instance of // Rating , // Votes , // Hits , // Downloads ... a.s.o. ...

1. find ...
Code: [Select]
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field(", u.", "user_name")."
and add ... ".get_user_table_field(", u.", "user_email")." ...
Code: [Select]
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field(", u.", "user_name")." ".get_user_table_field(", u.", "user_email")."

2. find ...
Code: [Select]
$register_array['image_rating_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".format_text($top_list[$i][$user_table_fields['user_name']])."</a>"
and add ... ".format_text($top_list[$i][$user_table_fields['user_email']]) ...
Code: [Select]
$register_array['image_rating_user_'.$i] = "<a href=\"".$site_sess->url($user_profile_link)."\">".format_text($top_list[$i][$user_table_fields['user_name']])."</a> ".format_text($top_list[$i][$user_table_fields['user_email']]);

3. now you can find the email after the username in top.php / top.html ... ;)
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 masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: user_email in top.php
« Reply #2 on: February 11, 2008, 07:37:11 PM »
hi

one cuestions ?

the result in my templates/my_template/top.html gallery show this form

Code: [Select]
  <tr>
                            <td valign="top" class="row1" width="22%">{image_votes_thumb_1}</td>
                            <td valign="top" class="row1" width="76%">{lang_user_name}&nbsp;{image_votes_user_1}<br />
                            {lang_votes}&nbsp;{image_votes_number_1}<br />
                            {lang_category}&nbsp;{image_votes_cat_1}<br />
                            {lang_email}&nbsp;{if user_email}<a href="{user_mailform_link}">{user_email_save}</a>{endif user_email}<br />
                            {lang_homepage}&nbsp;{if user_homepage}<a href="{user_homepage}" tarbet="_blank">{user_homepage}</a>{endif user_homepage}</td>
                          </tr>

in top.php change to this

Quote
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field(", u.", "user_name")." ".get_user_table_field(", u.", "user_email")."

in  votes add this

Quote
$register_array['image_votes_email_'.$i] = "<a href=\"".$site_sess->url($user_mailform_link)."\">".format_text($top_list[$i][$user_table_fields['user_name']])."</a> ".format_text($top_list[$i][$user_table_fields['user_email']]);

and

Code: [Select]
else {
    $register_array['image_votes_'.$i] = "--";
    $register_array['image_votes_user_'.$i] = "--";
    $register_array['image_votes_cat_'.$i] = "--";
    $register_array['image_votes_number_'.$i] = "--";
    $register_array['image_votes_thumb_'.$i] = "--";

  }
}

add this

Code: [Select]
else {
    $register_array['image_votes_'.$i] = "--";
    $register_array['image_votes_user_'.$i] = "--";
    $register_array['image_votes_cat_'.$i] = "--";
$register_array['image_votes_email_'.$i] = "--";
    $register_array['image_votes_number_'.$i] = "--";
    $register_array['image_votes_thumb_'.$i] = "--";

  }
}

thanks

Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: user_email in top.php
« Reply #3 on: February 11, 2008, 07:49:54 PM »
one cuestions ?

... mmm ... and what is your question ... ?
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 masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: user_email in top.php
« Reply #4 on: February 11, 2008, 08:13:01 PM »
hi

the problem is  solved

used this in top.html

Quote
<tr>
                            <td valign="top" class="row1" width="22%">{image_votes_thumb_1}</td>
                            <td valign="top" class="row1" width="76%">{lang_user_name}&nbsp;{image_votes_user_1}<br />
                            {lang_votes}&nbsp;{image_votes_number_1}<br />
                            {lang_category}&nbsp;{image_votes_cat_1}<br />
                            {lang_email}&nbsp;{if user_email}{image_votes_showemail_1}{endif user_email}<br />
                            </td>
                          </tr>

and top.php this

Quote
$sql = "SELECT i.image_id, i.user_id, i.cat_id, i.image_name, i.image_rating, i.image_votes, c.cat_name".get_user_table_field(", u.", "user_name")." ".get_user_table_field(", u.", "user_email").", i.image_thumb_file



Quote
$register_array['image_votes_showemail_'.$i] = "<a href=\"".$site_sess->url($user_mailform_link)."\">".format_text($top_list[$i][$user_table_fields['user_showemail']])."</a> ".format_text($top_list[$i][$user_table_fields['user_email']]);

and this

Quote
$register_array['image_votes_showemail_'.$i] = "--";

my problem is solved, now see the user_email in top.php, only used votes , not download or rating not hits, only votes

thanks
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?