Quoting in forums

Author Message

Eivind Marienborg

Wednesday 09 March 2005 12:50:20 pm

I've looked into the quotation functionality with simpletags, and using them to manually enter quotations works great.

Now I want to add a quote-button to all forum entries in my forum, that by clicking lets the user 1) Go directly to a new forum reply-form, and 2) having the message that "belonged" to the quote-button already present in the form (In other words like a normal quote button in most other forums).

I've looked into ezhttp, but can't get it to pass things to edit templates. I also thought about somehow getting the nodeID of the quoted forum entry, and then fetching it in the edit template, but since this also requires passing stuff to an edit template, it didn't work out.

I'm stuch here, and would appriciate alternative approaches to this. Does anyone have any experience with this, or have any ideas as to how to make it work?

Paul Forsyth

Wednesday 09 March 2005 12:51:29 pm

Try this out:

http://ez.no/ez_publish/documentation/customization/custom_design/user_specified_parameters

paul

Eivind Marienborg

Wednesday 09 March 2005 1:29:48 pm

This could work, but seems to have the same problem as using ezhttp. The form posts to <i>content/action</i>, but it then redirects to content/edit. The view parameters (and the ezhttp, I guess) is lost in the redirection. Am I doing anything wrong here?

This is my form code:

        <form method="post" action={concat("content/action/(node)/",$:item.node_id)|ezurl}>

        <input type="hidden" name="ContentNodeID" value="{$:item.object.owner.main_node_id}" />
        <input type="hidden" name="ContentObjectID" value="{$:item.object.owner.id}" />
        <input type="hidden" name="ViewMode" value="full" />
        <input type="hidden" name="privat" value="{$:item.object.data_map.privat.data_int}">

        <input type="hidden" name="NodeID" value="{$:item.object.owner.main_node_id}" />
        <input type="hidden" name="ClassID" value="47">
        <input type="image" name="NewButton" value="reply" src="/share/icons/reply.gif" alt="Svar!" title="Reply!">
        </form>

Paul Forsyth

Wednesday 09 March 2005 1:49:17 pm

I see now. Sorry for not spotting the redirect.

Yes that is more difficult. A few possible solutions:

- Set a cookie with Javascript.
- Modify kernel/content/action.php to pass on a hidden field with your node id.
- Add a new action as an extension which largely copies the 'NewButton' action but with your additions.

paul

Eivind Marienborg

Wednesday 09 March 2005 1:59:53 pm

Thanks again, I'll look into it :)

Brendan Pike

Tuesday 12 April 2005 8:17:07 pm

Hi Eivind

This thread interests me as I'm working on a forum at the moment also. How did you go with this, I'd also be interested in hearing of any other improvements you created.

www.dbinformatics.com.au

We are always interested in hearing from experienced eZ PHP programmers and eZ template designers interested in contract work.

Eivind Marienborg

Tuesday 12 April 2005 11:31:17 pm

Hi Brendan :)

I haven't had time to look deeper into this yet. Pauls ideas seem to be the best so far.

I need this functionality several places in my eZ site though, so I guess it's just a matter of time before I have to start looking into it again.

Please let me know if you find a working sollution for this :)

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.