Arkadaşlar vbulletin sitesinden bu uygulamayı indirdim
http://www.vbulletin.org/forum/showthread.php?t=242358
açıp kurduğumda sorun yok ama kurulduktan sonra 3 seçenek çıkıyor ve profilde No seçeneği seçili geliyor
ve profil uyarı aktif değil yani kullanıcı kendisi aktif etmesi lazım bunu nasıl otomatik olarak aktif moduna alabiliriz bir çok şey denedim ama malesef script'te değişiklik yapınca çalışmıyor
<?xml version="1.0" encoding="ISO-8859-1"?>
<product productid="quotenotify" active="1">
<title>Quote Notification</title>
<description><![CDATA[Notifies a user when they're quoted in a post]]></description>
<version>1.1.0</version>
<url />
<versioncheckurl />
<dependencies>
</dependencies>
<codes>
<code version="1.1.0">
<installcode><![CDATA[
$db->query_write("
INSERT INTO " . TABLE_PREFIX . "profilefield
(required, hidden, maxlength, size, displayorder, editable, type, data, height, def, optional, searchable, memberlist, regex, form, html)
VALUES
('0', '1', '250', '25', '100', '1', 'radio', 'a:3:{i:0;s:2:\"No\";i:1;s:5:\"Email\";i:2;s:15:\"Private Message\";}', '0', '1', '0', '0', '0', '', '2', '0')"
);
$vbulletin->GPC['profilefieldid'] = $db->insert_id();
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield ADD field" . $vbulletin->GPC['profilefieldid'] . " MEDIUMTEXT NOT NULL ;");
$db->query_write("
REPLACE INTO " . TABLE_PREFIX . "phrase
(languageid, fieldname, varname, text, product, dateline)
VALUES
(
0,
'cprofilefield',
'field" . $db->escape_string($vbulletin->GPC['profilefieldid']) . "_title',
'Quote Notification',
'quotenotify',
" . TIMENOW . "
),
(
0,
'cprofilefield',
'field" . $db->escape_string($vbulletin->GPC['profilefieldid']) . "_desc',
'Would you like to be notified when someone quotes something you said in a post?',
'quotenotify',
" . TIMENOW . "
)
");
$db->query_write("
REPLACE INTO " . TABLE_PREFIX . "settinggroup
(grouptitle, product)
VALUES
(
'Quote_Notification',
'quotenotify'
)
");
$db->query_write("
REPLACE INTO " . TABLE_PREFIX . "setting
(varname, value, grouptitle, product)
VALUES
(
'quotenotify_field',
" . $vbulletin->GPC['profilefieldid'] . ",
'Quote_Notification',
'quotenotify'
)
");
build_options();
]]></installcode>
<uninstallcode><![CDATA[
if ($vbulletin->options['quotenotify_field']) {
$db->query_write("DELETE FROM " . TABLE_PREFIX . "profilefield WHERE profilefieldid = " . $vbulletin->options['quotenotify_field']);
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "userfield DROP field" . $vbulletin->options['quotenotify_field']);
}
$db->query_write("DELETE FROM " . TABLE_PREFIX . "phrase WHERE product = 'quotenotify'");
$db->query_write("DELETE FROM " . TABLE_PREFIX . "setting WHERE product = 'quotenotify'");
$db->query_write("DELETE FROM " . TABLE_PREFIX . "settinggroup WHERE product = 'quotenotify'");
build_options();
]]></uninstallcode>
</code>
</codes>
<templates>
</templates>
<plugins>
<plugin active="1" executionorder="5">
<title>Quote Notification</title>
<hookname>newpost_complete</hookname>
<phpcode><![CDATA[$kr_load = array();
$kr_text = array();
if (preg_match_all("/\[quote=([^\\\"\]]*?)\](.*?)\[\/quote\]/is",$post['message'],$matches)>0) {
for ($kr=0;$kr<count($matches[1]);$kr++){
//echo $matches[1][$kr]."<br>";
$matches[1][$kr] = (strpos($matches[1][$kr],";")) ? substr($matches[1][$kr],0,strpos($matches[1][$kr],";")) : $matches[1][$kr];
if (strtolower($matches[1][$kr]) != strtolower($vbulletin->userinfo['username'])) {
if (!in_array($matches[1][$kr], $kr_load)) {
$kr_load[] = $matches[1][$kr];
$kr_text[] = "
.$matches[1][$kr]. adlı üyeden alıntı:
";
}
else {
for ($kri=0;$kri<count($kr_load);$kri++) {
if ($kr_load[$kri] == $matches[1][$kr]) {
$kr_text[$kri] .= "
.$matches[1][$kr]. adlı üyeden alıntı:
";
break;
}
}
}
}
}
}
if (count($kr_load) > 0) {
for ($kr=0;$kr<count($kr_load);$kr++) {
//echo "<br>" . $kr_load[$kr];
$quoteuserquery = $vbulletin->db->query_first("SELECT user_table.userid AS userid, user_table.email AS email, profile_fields.field" . $vbulletin->options['quotenotify_field'] . " AS wantquotenotify FROM " . TABLE_PREFIX . "user AS user_table LEFT JOIN " . TABLE_PREFIX . "userfield AS profile_fields ON (user_table.userid=profile_fields.userid) WHERE user_table.username='" . $vbulletin->db->escape_string($kr_load[$kr]) . "' GROUP BY user_table.userid");
$theurl = $vbulletin->options['bburl'] . "/showthread.php?p=" . $post['postid'] . "#post" . $post['postid'];
if ($quoteuserquery['wantquotenotify'] == "Private Message") {
// Override a potentially full inbox.
$senderpermissions['adminpermissions'] = 2;
$pmdm =& datamanager_init('PM', $vbulletin, ERRTYPE_ARRAY);
$qn_fromuserid = $vbulletin->userinfo['userid'];
$qn_fromusername = $vbulletin->userinfo['username'];
if ($vbulletin->options['quotenotify_sender'] > 0) {
$qn_fromuserid = $vbulletin->options['quotenotify_sender'];
$qn_fromtempuser = fetch_userinfo($qn_fromuserid);
$qn_fromusername = $qn_fromtempuser['username'];
}
$pmdm->set('fromuserid', $qn_fromuserid);
$pmdm->set('fromusername', $qn_fromusername);
$pmdm->set('title', construct_phrase($vbphrase['quotenotify_subject'], ''));
$pmdm->set('message', construct_phrase($vbphrase['quotenotify_message'], $kr_load[$kr], $vbulletin->userinfo['username'], $kr_text[$kr], $theurl));
$pmdm->set_recipients($kr_load[$kr], $senderpermissions);
$pmdm->set('dateline', TIMENOW);
$pmdm->save();
//echo "curr url is " . $vbulletin->url;
//echo "send a pm to " . $kr_load[$kr] . "with contents " . $kr_text[$kr];
}
if ($quoteuserquery['wantquotenotify'] == "Email") {
vbmail($quoteuserquery['email'], construct_phrase($vbphrase['quotenotify_subject'], "at " . $vbulletin->options['bbtitle']), construct_phrase($vbphrase['quotenotify_emailmessage'], $kr_load[$kr], $vbulletin->userinfo['username'], strip_quotes($kr_text[$kr]), $theurl, $threadinfo['title']));
}
}
}
]]></phpcode>
</plugin>
</plugins>
<phrases>
<phrasetype name="GLOBAL" fieldname="global">
<phrase name="quotenotify_emailmessage" date="0" username="" version=""><![CDATA[DO NOT REPLY TO THIS EMAIL!
***************************
Dear {1},
{2} has recently quoted you in a post he made in the thread "{5}". To view the post where you were quoted go to the following URL:
{4}
All the best,
Kiwi Biker forums]]></phrase>
<phrase name="quotenotify_message" date="0" username="" version=""><![CDATA[{1},
{2} has recently quoted you in a post he made. This user's quotes of you are:
{3}
To view the post where you were quoted, click here.]]></phrase>
<phrase name="quotenotify_subject" date="0" username="" version=""><![CDATA[Quote Notification {1}]]></phrase>
</phrasetype>
<phrasetype name="vBulletin Settings" fieldname="vbsettings">
<phrase name="setting_quotenotify_sender_desc" date="0" username="" version=""><![CDATA[Sets a default sender for PMs about Quote Notification. If set to 0, the sender is the person who did the quoting.]]></phrase>
<phrase name="setting_quotenotify_sender_title" date="0" username="" version=""><![CDATA[Quote Notification Sender]]></phrase>
</phrasetype>
</phrases>
<options>
</options>
<helptopics>
</helptopics>
<cronentries>
</cronentries>
<faqentries>
</faqentries>
</product>