PDA

View Full Version : Hybrid Mode Reply


Galadrium
11-11-2004, 11:57 AM
I am using hybrid mode. On the bottom right-hand corner of each post is an icon that says, "quote" and when you put the mouse over it it says "reply with quote."

What I want to do is to keep the quote icon, and add another icon next to it that posts a reply, to that particular thread, so that it is shown as responding to that thread, without automatically inserting the previous post wrapped in quote tags.

This does not sound like it would be that hard to do, but I have no skills with this type of thing. Thanks.

zurih
11-11-2004, 03:07 PM
open template postbit_legacy (if it doesnt work try postbit template)

Find:


<if condition="$post['replylink']">
<a href="$post[replylink]"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a>
</if>


After, add:

<if condition="$post['replylink']">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/reply_small.gif" alt="Reply" border="0" /></a>
</if>


:)

Galadrium
11-12-2004, 05:42 PM
Thanks a bunch... i'll give this a try.

Galadrium
11-12-2004, 06:11 PM
I tried editing the template postbit_legacy. And It added the extra reply button, just like I wanted. However, when I use private messages there is an extra button that becomes a broken link. Any suggestions about what I should do here?
I also tried editing the template postbit, but that didn't do anything.

Thanks. I really appreciate your help. :)

zurih
11-12-2004, 06:58 PM
I tried editing the template postbit_legacy. And It added the extra reply button, just like I wanted. However, when I use private messages there is an extra button that becomes a broken link. Any suggestions about what I should do here?

I really appreciate your help. :)

hmmm.... the PM is using the same postbit_legacy as threads... I dont really know how to make the new button "invisible" you are in PM.

maybe someone else can help?! :)

Ianomed
11-13-2004, 11:31 AM
yup, try this conditional


<if condition="THIS_SCRIPT != 'private'">

// template code that should only appear on posts and not in PM

</if>


alternatively:


<if condition="THIS_SCRIPT == 'private'">

// template code that should only appear on PMs and not on posts.

</if>


So I'm guessing that the new hybrid reply button should be encapsulated in the != private bit as follows.


<if condition="THIS_SCRIPT != 'private'"><if condition="$post['replylink']">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/reply_small.gif" alt="Reply" border="0" /></a>
</if></if>

zurih
11-13-2004, 03:37 PM
very nice!! :)
works great!

thanks Ianomed :glasses:

Ianomed
11-13-2004, 03:45 PM
My pleasure :)

You can also combine the conditions, I tried it.

<if condition="((THIS_SCRIPT != 'private') && $post['replylink'])">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/reply_small.gif" alt="Reply" border="0" /></a>
</if>

zurih
11-13-2004, 04:04 PM
useful stuff... :)

one thing I need to ask u. I want to add next to the reply button and new button that the user returns to forum inwitch the thread exists. do u know the href for that?

:)

Ianomed
11-13-2004, 04:19 PM
<a href="forumdisplay.php?$session[sessionurl]f=$thread[forumid]">


should do the trick.

zurih
11-13-2004, 04:24 PM
brilliant!!
lots of thanks.....!

by the way, I just installed your Quick Account Switch v1.1.1 - really handy. good work! :)

Ianomed
11-13-2004, 04:29 PM
Thank you :)
And I'm glad to see you've got this handled as well.

Galadrium
11-13-2004, 09:49 PM
Ianomed, Thanks for all your work on this. I am a little confused though. What modification should I apply to what template and where? I am assuming the postbit template, "legacy." Sorry I am a bit new to this.

Thanks again.

Ianomed
11-13-2004, 09:54 PM
Galadrium,

in postbit_legacy, where you added as per zurih's suggestion:

<if condition="$post['replylink']">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/reply_small.gif" alt="Reply" border="0" /></a>
</if>


replace that with:

<if condition="((THIS_SCRIPT != 'private') && $post['replylink'])">
<a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$post[postid]"><img src="$stylevar[imgdir_button]/reply_small.gif" alt="Reply" border="0" /></a>
</if>


Then the new reply link will no longer show on PMs. :)

You can ignore the other href I posted the code for, that was in answer to zurih's wanting a link to the forum where a thread was made in on each post.

Galadrium
11-13-2004, 10:33 PM
Works Great! Thank you so much!

Ianomed
11-13-2004, 10:49 PM
Glad I could help out :)