Forums / General / Quoting in forums

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 :)

eZ debug

Timing: Jan 18 2025 16:23:36
Script start
Timing: Jan 18 2025 16:23:36
Module start 'content'
Timing: Jan 18 2025 16:23:36
Module end 'content'
Timing: Jan 18 2025 16:23:37
Script end

Main resources:

Total runtime0.1564 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 589.0156180.8516
Module start 'content' 0.00700.0054 769.8672101.9297
Module end 'content' 0.01240.1439 871.7969530.4844
Script end 0.1563  1,402.2813 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00342.2019200.0002
Check MTime0.00130.8326200.0001
Mysql Total
Database connection0.00120.735810.0012
Mysqli_queries0.112071.61641410.0008
Looping result0.00120.76961390.0000
Template Total0.143691.810.1436
Template load0.00100.628510.0010
Template processing0.142691.167510.1426
Override
Cache load0.00060.352310.0006
Sytem overhead
Fetch class attribute can translate value0.00100.660510.0010
XML
Image XML parsing0.00020.129710.0002
General
dbfile0.00261.6489200.0001
String conversion0.00000.004630.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs