The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Clicking on reply adding text
I've been trying to do this for a while, but is it possible to add a username of the person you're replying to in the quick reply box when you click on "reply"? No, this isn't quoting. I just want raw text of the username of the post you're replying to. This is what I'm hoping for:
User Bob posts a message on a thread. User Charlie replies to Bob using "reply". The quick reply box shows right beneath. Normally it's empty, but in my case it should say: [Bob ] Without the brackets, but with the space. I've been looking for what the template would give me and I believe this is the snippet that's relevant: Code:
<vb:if condition="$show['quickreply'] AND !$show['threadedmode']"> <a id="qr_{vb:raw post.postid}" class='quickreply' href="{vb:raw post.replylink}&noquote=1" rel="nofollow" title="{vb:rawphrase quick_reply_to_this_message}"><img id="replyimg_{vb:raw post.postid}" src="{vb:raw vboptions.cleargifurl}" alt="{vb:rawphrase quick_reply_to_this_message}" /> {vb:rawphrase reply}</a> <span class="seperator"> </span> </vb:if> Any suggestions and help? |
#2
|
|||
|
|||
I don't think you're going to be able to do that by editing a template. I think how it works is that when you click the quick reply button, some javascript creates an instance of the editor and displays it under the post. Of course it's possible to put some initial text in the editor, but I think you'd probably have to add or modify javascript to do it.
|
#3
|
|||
|
|||
What javascript would I have to edit?
|
#4
|
||||
|
||||
|
#5
|
|||
|
|||
Temporarily Reserved
|
#6
|
|||
|
|||
Quote:
BTW, to answer the above question I don't know what javascript to change, I'm only assuming it could be done somehow. |
Благодарность от: | ||
CAG CheechDogg |
#7
|
|||
|
|||
Quote:
Edit: I looked around and found a mod that has a skeleton of what I want, but I don't know how to make use of it. This is from vBulletin 3 so I can't use it (I use 4.2.2), nor do I really want to, as this is not what I'm looking for. But this mod allows you to select one of the "canned replies" you wrote which will instantly write it out. I think that's what it does. This seems to be the relevant portion of the XML that I opened up: HTML Code:
<plugins> <plugin active="1" executionorder="5"> <title>Canned Replies</title> <hookname>global_start</hookname> <phpcode><![CDATA[if ($permissions['cannedreplies'] & $vbulletin->bf_ugp['cannedreplies']['canusecr']) { if (THIS_SCRIPT == 'newreply' OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'infraction' OR THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'showthread') { $userid = $vbulletin->userinfo['userid']; $crtest .= "$vbphrase[cannedreplies]: <br />"; $crtest .= "<select onchange=\"insertAtCaret(this.options[this.selectedIndex].value)\">"; $crtest .= "<option value=\"\"></option>"; $crs = $db->query_read("SELECT id, title, reply FROM " . TABLE_PREFIX . "cannedreplies WHERE userid=$userid || reply LIKE '{share}%' || reply LIKE '{share}%' ORDER BY title ASC"); while($row = $db->fetch_array($crs)) { $row[reply] = preg_replace("#(\r\n|\n|\r)#s", "\r\n <br>", addslashes($row[reply])); $row[reply] = str_replace('\"', '"', $row[reply]); $row[reply] = str_replace("\'", ''', $row[reply]); $crtest .= "<option value=\"$row[reply]\">$row[title]</option>"; } $crtest .= "</select>"; } }]]></phpcode> </plugin> <plugin active="1" executionorder="5"> <title>Canned Replies Javascript AutoInsert</title> <hookname>parse_templates</hookname> <phpcode><![CDATA[if ($permissions['cannedreplies'] & $vbulletin->bf_ugp['cannedreplies']['canusecr']) { if (THIS_SCRIPT == 'newreply' OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'infraction' OR THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'showthread') { if (THIS_SCRIPT == 'showthread') { $editorid = "vB_Editor_QR"; } else { $editorid = "vB_Editor_001"; } eval('$crjs = "' . fetch_template('cr_js') . '";'); $vbulletin->templatecache['pm_newpm'] = str_replace('<form', '$crjs <form', $vbulletin->templatecache['pm_newpm']); $vbulletin->templatecache['newthread'] = str_replace('</head>', '$crjs </head>', $vbulletin->templatecache['newthread']); $vbulletin->templatecache['newreply'] = str_replace('</head>', '$crjs </head>', $vbulletin->templatecache['newreply']); $vbulletin->templatecache['userinfraction'] = str_replace('</head>', '$crjs </head>', $vbulletin->templatecache['userinfraction']); $vbulletin->templatecache['SHOWTHREAD'] = str_replace('</head>', '$crjs </head>', $vbulletin->templatecache['SHOWTHREAD']); } }]]></phpcode> </plugin> <plugin active="1" executionorder="5"> <title>Parser</title> <hookname>parse_templates</hookname> <phpcode><![CDATA[if ($permissions['cannedreplies'] & $vbulletin->bf_ugp['cannedreplies']['canusecr']) { if (THIS_SCRIPT == 'profile' OR THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'usercp') { $cannedreplieslink = "<tr><td class=\"alt2\" nowrap=\"nowrap\"><a class=\"smallfont\" href=\"cannedreplies.php?$session[sessionurl]\">Edit Your $vbphrase[cannedreplies]</a></td></tr>"; $vbulletin->templatecache['USERCP_SHELL'] = str_replace('$vbphrase[edit_ignore_list]</a></td></tr>','$vbphrase[edit_ignore_list]</a></td></tr>$cannedreplieslink',$vbulletin->templatecache['USERCP_SHELL']); } }]]></phpcode> </plugin> <plugin active="1" executionorder="5"> <title>Parser 2</title> <hookname>parse_templates</hookname> <phpcode><![CDATA[if ($permissions['cannedreplies'] & $vbulletin->bf_ugp['cannedreplies']['canusecr']) { if (THIS_SCRIPT == 'newreply' OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'infraction' OR THIS_SCRIPT == 'private' OR THIS_SCRIPT == 'showthread') { $crdd = "<div class=\"smallfont\"> $crtest </div><br />"; $vbulletin->templatecache['pm_newpm'] = str_replace('<!-- / subject field -->', '<!-- / subject field -->$crdd', $vbulletin->templatecache['pm_newpm']); $vbulletin->templatecache['newthread'] = str_replace('<!-- / subject field -->', '<!-- / subject field -->$crdd', $vbulletin->templatecache['newthread']); $vbulletin->templatecache['newreply'] = str_replace('<!-- / subject field -->', '<!-- / subject field -->$crdd', $vbulletin->templatecache['newreply']); $vbulletin->templatecache['userinfraction'] = str_replace('<!-- / note field -->', '<!-- / note field --> $crdd', $vbulletin->templatecache['userinfraction']); $vbulletin->templatecache['SHOWTHREAD'] = str_replace('$vbphrase[message]', '$crdd $vbphrase[message]', $vbulletin->templatecache['SHOWTHREAD']); } }]]></phpcode> </plugin> </plugins> |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|