Author Topic: I want to pay to my visitors for upload each image  (Read 5360 times)

0 Members and 1 Guest are viewing this topic.

Offline jimraynor

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
I want to pay to my visitors for upload each image
« on: April 30, 2012, 04:52:42 PM »
Hello Rembrandt.

i want to pay to my visitors for upload each image.

i want to calculate      {count_user_images}*0.01$  in this page.

how can i do this?

Thank you.
« Last Edit: May 03, 2012, 04:37:26 AM by Rembrandt »

Offline jimraynor

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
I want to pay to my visitors for upload each image
« Reply #1 on: May 02, 2012, 02:14:47 PM »
For example. member can see his fund in "show profile" page.

Total Images:    3855
Money:    38.55 $
« Last Edit: May 03, 2012, 04:37:42 AM by Rembrandt »

Rembrandt

  • Guest
Re: I want to pay to my visitors for upload each image
« Reply #2 on: May 03, 2012, 04:26:15 PM »
Hi!

1.) search in lang/yourLang/main.php and insert above from "?>":

 $lang
['count_image'] = "Images Total:";
 
$lang['to_pay_image'] = "To Pay:";


2.) search in member.php:

      $user_email_button 
REPLACE_EMPTY;
    }
        
$site_template->register_vars(array(

replace:

      $user_email_button 
REPLACE_EMPTY;
    }

//############## Start Count User Images ############
    
$sql "SELECT COUNT(image_id) AS sum_images
            FROM "
.IMAGES_TABLE."
            WHERE image_active = 1  AND user_id = "
.$user_row['user_id']."
            "
;
    
$sum_images $site_db->query_firstrow($sql);
  
//############## End Count Images #################    
    
$site_template->register_vars(array(
//############## Start Count User Images ############
      
"count_user_images" => "<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_user=".urlencode($user_row['user_name']))."\">".$sum_images['sum_images']."</a>",    
      
"to_pay_images" => ($sum_images['sum_images'] * 0.01).".-",
      
"lang_count_image" => $lang['count_image'],
      
"lang_to_pay_image" => $lang['to_pay_image'],
//############## End Count User Images ##############


3.) search in your Templates/member_profile.html:
Code: [Select]
       <tr>
          <td class="row2"><b>{lang_icq}</b></td>
          <td class="row2">{if user_icq}<a href="http://www.icq.com/people/about_me.php?uin={user_icq}" target="_blank">{user_icq}</a> (<b>{user_icq_status}</b>){endif user_icq}</td>
        </tr>
and insert below or how ever you want:
Code: [Select]
       <tr>
          <td class="row1"><b>{lang_count_image}</b></td>
          <td class="row1">{count_user_images}</td>
        </tr>
        <tr>
          <td class="row2"><b>{lang_to_pay_image}</b></td>
          <td class="row2">{to_pay_images}</td>
        </tr>

and do not forget: http://www.4homepages.de/4images/license.php#english

mfg Andi
« Last Edit: May 04, 2012, 05:12:31 AM by Rembrandt »

Offline jimraynor

  • Jr. Member
  • **
  • Posts: 53
    • View Profile
Re: I want to pay to my visitors for upload each image
« Reply #3 on: May 04, 2012, 01:27:46 PM »
Thank you so much rembrandt. You are great.. i have a last request to you. i hope you are not angry to me for this.

when i paid members i can write a new section in control panel.

apologise for my english. for example.

22 july
total image: 3500
pay: 35.00$
Prepaid: 0$

1 month later.

22 august
total image: 4500
pay: 45.00$
prepaid: 35.00 (22 july)

only adminstrator can change prepaid section in admin panel. members cant change prepaid section in profile edit page. ithis section dont to be other sections. icq, homepage etc.