Devilking
Tasmanian Devil
- Член од
- 16 јануари 2006
- Мислења
- 664
- Поени од реакции
- 1
Интересни vBulletin Hacks!
Еве интересен vBulettin Hack кој автоматски создава Тема со која на членот на форумот кој на денешниот ден слави роденден му создава тема во која членовите можат да му го честитаат роденденот..
Еве како можете да го инсталирате овој мал додаток:
--------------------------------------
Фајлови кои треба да ги промените: /includes/cron/birthday.php
--------------------------------------
Во /includes/cron/birthday.php
<<<<<<<<<<<<<< Чекор 1 >>>>>>>>>>>>>>>>
Заменете:
--------------------------------------
$birthdays = $DB_site->query("
SELECT username, email, languageid, birthday
FROM " . TABLE_PREFIX . "user
WHERE birthday LIKE '$today-%' AND
(options & $_USEROPTIONS[adminemail]) AND
usergroupid IN ($ids)
");
--------------------------------------
Со:
--------------------------------------
$birthdays = $DB_site->query("
SELECT username, email, languageid, birthday, userid
FROM " . TABLE_PREFIX . "user
WHERE birthday LIKE '$today-%' AND
(options & $_USEROPTIONS[adminemail]) AND
usergroupid IN ($ids)
");
--------------------------------------
<<<<<<<<<<<<<< Чекор 2 >>>>>>>>>>>>>>>>
Под:
--------------------------------------
$emails .= $userinfo['username'];
--------------------------------------
Додадете:
--------------------------------------
$bday_people .= "<a href=\"member.php?u=".$userinfo['userid']."\">".$username."</a>, born ".$userinfo['birthday']."\n";
$bday_title .= $username.", ";
--------------------------------------
<<<<<<<<<<<<<< Чекор 3 >>>>>>>>>>>>>>>>
Под
--------------------------------------
log_cron_action('Birthday Email sent to: ' . $emails, $nextitem);
--------------------------------------
Додадете:
--------------------------------------
// Create Birthday Thread Hack
$birthday_greeting_thread = "Dear Forum,<br><br>Here are today's birthdays!<br><br>$bday_people";
$greeter=1; //Your User ID
$greeter_name="Your User Name"; //Your User Name
$greetings_forum=1; //enter the forum id that you want the thread to go into
$todays_date11= date("F j, Y", mktime (date("H")+$timeset, date("i"), date("s"), date("m"), date("d"), date("Y")));
$title3= "Happy Birthday to ";
$title3.= $bday_title;
$title3.= "on ";
$title3.=$todays_date11;
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($title3))."','".time()."','$greetings_forum','1','0','".addslashes($greeter_name)."','$greeter','".addslashes($greeter_name)."','".time()."','0','1','0')");
$log_threadid=$DB_site->insert_id();
// Creating Post
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$log_threadid','".addslashes(htmlspecialchars($title3))."','".addslashes($greeter_name)."','$greeter','".time()."','".addslashes($birthday_greeting_thread)."','1','0','127.0.0.1','0','1')");
// Updating Forum
$DB_site->query("UPDATE " . TABLE_PREFIX . "forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes($greeter_name)."' WHERE forumid = $greetings_forum");
// Updating User's Post
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET posts=posts+1 WHERE userid=$greeter");
// End Create Birthday Thread Hack
--------------------------------------
Заменете ги променливите за userid, username и forumid.
Можете да ја промените пораката помеѓу <<< EOF и EOF; таговите. Истото така можете да користите и IMG тагови.
--------------------------------------
Еве интересен vBulettin Hack кој автоматски создава Тема со која на членот на форумот кој на денешниот ден слави роденден му создава тема во која членовите можат да му го честитаат роденденот..
Еве како можете да го инсталирате овој мал додаток:
--------------------------------------
Фајлови кои треба да ги промените: /includes/cron/birthday.php
--------------------------------------
Во /includes/cron/birthday.php
<<<<<<<<<<<<<< Чекор 1 >>>>>>>>>>>>>>>>
Заменете:
--------------------------------------
$birthdays = $DB_site->query("
SELECT username, email, languageid, birthday
FROM " . TABLE_PREFIX . "user
WHERE birthday LIKE '$today-%' AND
(options & $_USEROPTIONS[adminemail]) AND
usergroupid IN ($ids)
");
--------------------------------------
Со:
--------------------------------------
$birthdays = $DB_site->query("
SELECT username, email, languageid, birthday, userid
FROM " . TABLE_PREFIX . "user
WHERE birthday LIKE '$today-%' AND
(options & $_USEROPTIONS[adminemail]) AND
usergroupid IN ($ids)
");
--------------------------------------
<<<<<<<<<<<<<< Чекор 2 >>>>>>>>>>>>>>>>
Под:
--------------------------------------
$emails .= $userinfo['username'];
--------------------------------------
Додадете:
--------------------------------------
$bday_people .= "<a href=\"member.php?u=".$userinfo['userid']."\">".$username."</a>, born ".$userinfo['birthday']."\n";
$bday_title .= $username.", ";
--------------------------------------
<<<<<<<<<<<<<< Чекор 3 >>>>>>>>>>>>>>>>
Под
--------------------------------------
log_cron_action('Birthday Email sent to: ' . $emails, $nextitem);
--------------------------------------
Додадете:
--------------------------------------
// Create Birthday Thread Hack
$birthday_greeting_thread = "Dear Forum,<br><br>Here are today's birthdays!<br><br>$bday_people";
$greeter=1; //Your User ID
$greeter_name="Your User Name"; //Your User Name
$greetings_forum=1; //enter the forum id that you want the thread to go into
$todays_date11= date("F j, Y", mktime (date("H")+$timeset, date("i"), date("s"), date("m"), date("d"), date("Y")));
$title3= "Happy Birthday to ";
$title3.= $bday_title;
$title3.= "on ";
$title3.=$todays_date11;
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "thread (threadid,title,lastpost,forumid,open,replycount,postusername,postuserid,lastposter,dateline,iconid,visible,attach) VALUES (NULL,'".addslashes(htmlspecialchars($title3))."','".time()."','$greetings_forum','1','0','".addslashes($greeter_name)."','$greeter','".addslashes($greeter_name)."','".time()."','0','1','0')");
$log_threadid=$DB_site->insert_id();
// Creating Post
$DB_site->query("INSERT INTO " . TABLE_PREFIX . "post (postid,threadid,title,username,userid,dateline,pagetext,allowsmilie,showsignature,ipaddress,iconid,visible) VALUES (NULL,'$log_threadid','".addslashes(htmlspecialchars($title3))."','".addslashes($greeter_name)."','$greeter','".time()."','".addslashes($birthday_greeting_thread)."','1','0','127.0.0.1','0','1')");
// Updating Forum
$DB_site->query("UPDATE " . TABLE_PREFIX . "forum SET replycount=replycount+1,threadcount=threadcount+1,lastpost='".time()."',lastposter='".addslashes($greeter_name)."' WHERE forumid = $greetings_forum");
// Updating User's Post
$DB_site->query("UPDATE " . TABLE_PREFIX . "user SET posts=posts+1 WHERE userid=$greeter");
// End Create Birthday Thread Hack
--------------------------------------
Заменете ги променливите за userid, username и forumid.
Можете да ја промените пораката помеѓу <<< EOF и EOF; таговите. Истото така можете да користите и IMG тагови.
--------------------------------------