форум vBSupport.ru > vBulletin > Old vB versions (3.0.x & 2.x.x) > vBulletin 3.6.x > Hacks, mods and scripts [3.6.x]
Register Меню vBsupport Изображения Files Manager О рекламе Today's Posts Search
  • Родная гавань
  • Блок РКН снят
  • Premoderation
  • For English speaking users
  • Каталог Фрилансеров
  • If you want to buy some product or script
  • Администраторам
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
Блок РКН снят, форум доступен на всей территории России, включая новые терртории, без VPN
На форуме введена премодерация ВСЕХ новых пользователей

Почта с временных сервисов, типа mailinator.com, gawab.com и/или прочих, которые предоставляют временный почтовый ящик без регистрации и/или почтовый ящик для рассылки спама, отслеживается и блокируется, а так же заносится в спам-блок форума, аккаунты удаляются
for English speaking users:
You may be surprised with restriction of access to the attachments of the forum. The reason is the recent change in vbsupport.org strategy:

- users with reputation < 10 belong to "simple_users" users' group
- if your reputation > 10 then administrator (kerk, Luvilla) can decide to move you into an "improved" group, but only manually

Main idea is to increase motivation of community members to share their ideas and willingness to support to each other. You may write an article for the subject where you are good enough, you may answer questions, you may share vbulletin.com/org content with vbsupport.org users, receiving "thanks" equal your reputation points. We should not only consume, we should produce something.

- you may:
* increase your reputation (doing something useful for another members of community) and being improved
* purchase temporary access to the improved category:
10 $ for 3 months. - this group can download attachments, reputation/posts do not matter.
20 $ for 3 months. - this group can download attachments, reputation/posts do not matter + adds eliminated + Inbox capacity increased + files manager increased permissions.

Please contact kerk or Luvilla regarding payments.

Important!:
- if your reputation will become less then 0, you will be moved into "simple_users" users' group automatically.*
*for temporary groups (pre-paid for 3 months) reputation/posts do not matter.
Уважаемые пользователи!

На форуме открыт новый раздел "Каталог фрилансеров"

и отдельный раздел для платных заказов "Куплю/Закажу"

Если вы хотите приобрести какой то скрипт/продукт/хак из каталогов перечисленных ниже:
Каталог модулей/хаков
Ещё раз обращаем Ваше внимание: всё, что Вы скачиваете и устанавливаете на свой форум, Вы устанавливаете исключительно на свой страх и риск.
Сообщество vBSupport'а физически не в состоянии проверять все стили, хаки и нули, выкладываемые пользователями.
Помните: безопасность Вашего проекта - Ваша забота.
Убедительная просьба: при обнаружении уязвимостей или сомнительных кодов обязательно отписывайтесь в теме хака/стиля
Спасибо за понимание
 
 
 
 
Diablos
Эксперт
 
Diablos's Avatar
Default Upload/Download & Total Upload/Download stats
1

Description: This mod display number of filesize and number of upload/download in postbit.

New queries: 4
File Mod: 3
Template mod: 3
Installation Time: 4-5 mins

##-----------------------------------------
Run Queries: (in AdminCP or phpMyAdmin)

ALTER TABLE `user` ADD `uploadno` SMALLINT( 4 ) DEFAULT '0' NOT NULL ,
ADD `uploadtotal` INT( 15 ) DEFAULT '0' NOT NULL ,
ADD `downloadno` SMALLINT( 4 ) DEFAULT '0' NOT NULL ,
ADD `downloadtotal` INT( 15 ) DEFAULT '0' NOT NULL


##-----------------------------------------
File Modifications

1. Open, includes/functions_showthread.php (1 change)

FIND:
// format posts number
$post['posts'] = vb_number_format($post['posts']);

BELOW, ADD:

// show user upload/download stats by tnguy3n
$getuserstats = $DB_site->query("SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = $post[userid]");
while ($userstats = $DB_site->fetch_array($getuserstats)) {
$numupload = $userstats['uploadno'];
$uploadtotal = $userstats['uploadtotal'];
$numdownload = $userstats['downloadno'];
$totaltotal = $userstats['downloadtotal'];
}
// end userstats

2. Open attachment.php (1 change)

FIND:

else
{
// or doing it once an hour
$DB_site->shutdown_query("
INSERT INTO " . TABLE_PREFIX . "attachmentviews (attachmentid)
VALUES ($attachmentinfo[attachmentid])
");
}


BELOW, ADD:

// update user download stats by tnguy3n
$filesize = $attachmentinfo['filesize']/1024;
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET downloadno = downloadno + 1
WHERE userid = $bbuserinfo[userid]
");
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET downloadtotal = downloadtotal + $filesize
WHERE userid = $bbuserinfo[userid]
");

3. Open newattachment.php (1 change)

FIND:
eval('$attachments .= "' . fetch_template('newattachmentbit') . '";');

BELOW, ADD:

// update user upload stats by tnguy3n
$filesize = intval($attach['filesize']);
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET uploadno = uploadno + $attachcount
WHERE userid = $bbuserinfo[userid]
");
$DB_site->shutdown_query("
UPDATE " . TABLE_PREFIX . "user
SET uploadtotal = uploadtotal + $filesize
WHERE userid = $bbuserinfo[userid]
");


##---------------------------------

Template modification:

Open postbit(_legacy): (1 change)

FIND:
$vbphrase[posts]: $post[posts]

BELOW, ADD:

<br />File Upload: $numupload<br />
Total Upload: $uploadtotal KB<br />
File Download: $numdownload<br />
Total Download: $totaltotal KB<br />


<!---------- All done! ---------->


Демо приказало долго жить, у себя не ставил т.к. ещё не решил многих траблов с тем что уже поставил
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 02:52 PM.


Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.