The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hello
I'm using thread tags to categorize threads. So I want to log tag changes. As a first step I tried to send me an email after each change. But i failted to create a plugin with something like Code:
vbmail($vbulletin->options['webmasteremail'], "Tags Changed", "User: " . $vbulletin->userinfo['userid'] . "\r\n" . "Forum: " . $threadinfo['forumid']) . "\r\n" . "Thread: " . $threadinfo['threadid']) . "\r\n" . "Title: " . $threadinfo['title']) . "\r\n" . "------------------------------------" . "\r\n" . "New tags: " . $$$ . "\r\n" . "Old tags: " . $$$ , true); Is there some code / addon or similar I could use? Or any idea? Thanks for any help! Bruno |
|
#2
|
||||
|
||||
|
If you are trying to log tag changes, then find the area in the code where tag changes are actually submitted and then pick a hook location there. Which pages have you been looking at to find hook locations?
|
|
#3
|
|||
|
|||
|
O.K. Got it:
Code:
// ##############################################################################
if ($_POST['do'] == 'managetags')
{
//B
$Btmp = $threadinfo['taglist'];
(...)
//B
$threadinfo = fetch_threadinfo($threadinfo['threadid'], false); // get updated tag list
$threadinfo['taglistOld'] = $Btmp;
($hook = vBulletinHook::fetch_hook('threadtag_domanage_postdelete2')) ? eval($hook) : false;
if ($vbulletin->GPC['ajax'])
{
//B $threadinfo = fetch_threadinfo($threadinfo['threadid'], false); // get updated tag list
Or are there any better ideas than manipulate the php and add a hook? Thanks! Bruno --------------- Added 21 Oct 2009 at 17:17 --------------- Thanks Lynne for you reply. I tried what you said, but its REALLY complicated... even impossible without code changes I think... |
|
#4
|
||||
|
||||
|
Why do you want to add another hook there? Why not just use threadtag_domange_postdelete ?
|
|
#5
|
|||
|
|||
|
I don't know, what threadtag_domange_postdelete is for. At this moment, the new tags are not verified and definitly set... these Lines MUST be executed, before I know if tags have been changed:
Code:
$vbulletin->GPC['ajax'] $threadinfo = fetch_threadinfo($threadinfo['threadid'], false); // get updated tag list Greetings, Bruno |
|
#6
|
||||
|
||||
|
What is your overall idea of what you want done? Why do you need to be notified *before* the change? And do you expect the change to stop until you do something here? I would think that would be quite complicated to do.
|
|
#7
|
|||
|
|||
|
Hi Lynne
Since a thread can have only one prefix, I use tags instead. So more security is necessary:
Thanks for your support! Greetings, Bruno |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|