Ultimate Points & Hotschi's Download MOD verknüpfen!

Eingeschränkter Support zu Add-Ons der hier veröffentlichten MODs.
sakkiotto
Beiträge: 104
Registriert: Mo 28. Apr 2014, 03:56

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von sakkiotto »

Hey, i use this mod for 6.4.9... i need only disable download for user with 0 or negative points... please....
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2630
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von oxpus »

Sorry, I don't know the internals from the Ultimate Points MOD, so I can't really help.
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
sakkiotto
Beiträge: 104
Registriert: Mo 28. Apr 2014, 03:56

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von sakkiotto »

ok.. i have change limit minimum post with limit minimum points ... (WORK)
but i use version 6.4.9 because is last version for this addon on first post..
i wish install your last version 6.5.27 but i don't know how insert this addon specially download.php (need only for download, ACM is ok and upload is not important).
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2630
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von oxpus »

I'm hoping to be right:
Open instead download.php the file dl_mod/includes/dl_load.php and find the code

Code: Alles auswählen

			if ($count_user_traffic && FOUNDER_TRAFFICS_OFF == false)
			{
				$user->data['user_traffic'] -= $dl_file['file_size'];

				$sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
					'user_traffic' => $user->data['user_traffic'])) . ' WHERE user_id = ' . (int) $user->data['user_id'];
				$db->sql_query($sql);

				if ($config['dl_user_traffic_once'])
				{
					$sql = 'INSERT INTO ' . DL_NOTRAF_TABLE . ' ' . $db->sql_build_array('INSERT', array(
						'user_id'	=> $user->data['user_id'],
						'dl_id'		=> $dl_file['id']));
					$db->sql_query($sql);
				}
Then insert the code which was last named to be inserted in downloads.php.
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
sakkiotto
Beiträge: 104
Registriert: Mo 28. Apr 2014, 03:56

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von sakkiotto »

perfect!!!!!!!!!!!!!! IT'S WORK

i have insert this (first post addons file download.php)

Code: Alles auswählen

   //----- Ultimate Points für upload eintragen --------         

               //Ultimate Points MOD installed and enabled?
               if(isset($config['points_enable']) and $config['points_enable'] == true)
               {
                  $sql = 'SELECT user_points FROM ' . USERS_TABLE . ' WHERE user_id = ' . $user->data['user_id'];    
                  $result = $db->sql_query($sql);
                  $row = $db->sql_fetchrow($result);
                  $db->sql_freeresult($result);

                  $sql = 'UPDATE ' . USERS_TABLE . ' 
                        SET user_points = ' . ($row['user_points'] - $points_values['dll_mod_download'])  . ' 
                        WHERE user_id = ' . $user->data['user_id']; 
                  $db->sql_query($sql);
               }            
           //---------------------------------------      



after file dl_mod/includes/dl_load.php

Code: Alles auswählen

			if ($count_user_traffic && FOUNDER_TRAFFICS_OFF == false)
			{
				$user->data['user_traffic'] -= $dl_file['file_size'];

				$sql = 'UPDATE ' . USERS_TABLE . ' SET ' . $db->sql_build_array('UPDATE', array(
					'user_traffic' => $user->data['user_traffic'])) . ' WHERE user_id = ' . (int) $user->data['user_id'];
				$db->sql_query($sql);

				if ($config['dl_user_traffic_once'])
				{
					$sql = 'INSERT INTO ' . DL_NOTRAF_TABLE . ' ' . $db->sql_build_array('INSERT', array(
						'user_id'	=> $user->data['user_id'],
						'dl_id'		=> $dl_file['id']));
					$db->sql_query($sql);
				}
			}
			
		}

another little help ... where is the function for check limit posts for download? what file? in versione 6.4.9 it was

Code: Alles auswählen

  * Block downloads for users who must have at least the given number of posts to download a file
      * and tries to download after spamming in the forum more than the needed number of posts in the last 24 hours   
      */
      if ($user->data['user_posts'] >= $config['dl_posts'] && !$dl_file['extern'] && !$dl_file['free'] && $config['dl_antispam_posts'] && $config['dl_antispam_hours'])
      {
         $sql = 'SELECT COUNT(post_id) AS total_posts FROM ' . POSTS_TABLE . '
            WHERE poster_id = ' . $user->data['user_id'] . '
               AND post_time >= ' . (time() - ($config['dl_antispam_hours'] * 3600));
         $result = $db->sql_query($sql);
         $post_count = $db->sql_fetchfield('total_posts');
         $db->sql_freeresult($result);

         if ($post_count >= $config['dl_antispam_posts'])
         {
            $status = false;
         }
      }
thanks advices.. im ready for a good coffeee oxpus for your support :)
sakkiotto
Beiträge: 104
Registriert: Mo 28. Apr 2014, 03:56

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von sakkiotto »

Sorry .. found it.. i have fix other files.. for minim points limit for download :))
sakkiotto
Beiträge: 104
Registriert: Mo 28. Apr 2014, 03:56

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von sakkiotto »

can u tell me your paypal .. send u a good coffee :)

i have change minimum post in minimum point... :) it's r0x :)
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2630
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von oxpus »

I don't use paypal...
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
sakkiotto
Beiträge: 104
Registriert: Mo 28. Apr 2014, 03:56

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von sakkiotto »

Hello :D im back again...
my situation with this mod is all ok .... but it's possible ignore decrease point when i put a download in url external ?
it's all right in download internal ... works awesome
Benutzeravatar
oxpus
Chief handy-man
Beiträge: 2630
Registriert: Do 13. Dez 2007, 23:06
Wohnort: Irgendwo im I-Net
Kontaktdaten:

Re: Ultimate Points & Hotschi's Download MOD verknüpfen!

Beitrag von oxpus »

???
Where do you put the external link?
Karsten Ude
Kein Support per Messenger, Email oder PN! Unaufgeforderte Nachrichten werden ignoriert!
No support per Messenger, Email or PM. Each unasked message will be ignored!
Antworten