Option to solve topics & Give XP

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Option to solve topics & Give XP

jsmoraes
This post was updated on .
The user Nitemare post a question in http://support.nabble.com/Option-to-solve-topics-amp-Give-XP-td7588566.html#a7588728 about the possibility to change the appearance of main page and topic page for support community/forums.

I tryied some lines of code, and got the following:





The ideia is to have icon that identify topics with solved questions in main page, and icon in topic page that identify the question and the message with answer.

The implematation of code to Give XP was ignored. This is another issue. Out of my scope.

An issue was found:

There isn't field to solved status, similar to pinned status in database. Therefore I decided to flag the subect of messages to identify them. And I am using the symbol ¬ for message with answer and .¬ to message with question. They will used to decisions in the code.

issue: I need trim them to show in the page, and other situations. Not only for better appearance, but as someone can reply the flagged message, this flag will propagate, and the icon too.

Up to now,  I don't know how to trim them. The best position of the flag in the subject text should be the left side. And a kind of function left strig can be used to clearing.

I didn't find, and I don't know if exist, any macro that use this function in NAML. And I don't know how to call a JAVA function  from a macro NAML, without be inside of HTML tag: as input button and under onclick event.

I need trim the text returned by macros:  n.title, n.break_up.page_node.subject and n.node_text.text

Any information and help will be welcome ! 

I know that they aren't the best lines of code, and I don't know if they will cause any problem with the performance of the pages or speed to open them. I did the work in a small test forum.

The full code:

Icon in main page:

<override_macro name="smart_post_link" requires="node" dot_parameter="href" parameters="text, title, class">
    <n.if.is_post>
        <then>

            <n.if.contains_substring string="[n.node_text.text/]" substring=" .¬">
           <then>
            <img src="http://jsmtstnaml.23557.n7.nabble.com/file/n83/checkmark.png" />&nbsp;<a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.node_text.text/></a>
            <n.call_later value="[n.topic_node.id/]" param="markUnreadTopics"/>
                </then>
                <else>
             <a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.node_text.text/></a>
            <n.call_later value="[n.topic_node.id/]" param="markUnreadTopics"/>
                </else>
            </n.if.contains_substring>  

        </then>
        <else.node_link text="[n.text/]"/>
    </n.if.is_post>
</override_macro>

Icon in title of topic page:

<override_macro name="topic_header">
    <div id="topic-search-box" class="search-box float-right" style="padding:.5em 0">
        <n.page_node.search_box/>
    </div>

    <n.if.contains_substring string="[n.break_up.page_node.subject/]" substring=" .¬">
      <then>
               <h1 id="post-title" class="adbayes-content" style="margin:0.25em 0 .8em"><img src="http://jsmtstnaml.23557.n7.nabble.com/file/n83/checkmark.png" />&nbsp;<n.break_up.page_node.subject/></h1>
      </then>
      <else>
    <h1 id="post-title" class="adbayes-content" style="margin:0.25em 0 .8em">
        <n.break_up.page_node.subject/>
    </h1>
         </else>
    </n.if.contains_substring>   

</override_macro>

Icons of messages in topic page:

<override_macro name="classic_subject_line" requires="node">
        <n.if.contains_substring string="[n.break_up.subject/]" substring="¬">
        <then>
            <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬">
                <then>
                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                    <img src="http://jsmtstnaml.23557.n7.nabble.com/file/n81/iconsolucionado.png" />&nbsp;<n.break_up.subject/>
                </h2>          
            </then>
            <else>
                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                    <img src="http://jsmtstnaml.23557.n7.nabble.com/file/n80/iconsolucionado2.png" />&nbsp;<n.break_up.subject/>
                </h2>
             </else>
            </n.if.contains_substring>
        </then>
        <else>
    <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
        <n.break_up.subject/>
    </h2>
        </else>
        </n.if.contains_substring>
</override_macro>
Observatório de Astronomia de Vilatur - W. Herschel
Saquarema - RJ - Brasil
http://www.astronomia.pousadavilatur.com.br
Reply | Threaded
Open this post in threaded view
|

Final Code

jsmoraes
This post was updated on .
Ok, I finished the code. With the following features:

1) Mark the message as question and present an icon to it.

2) Mark the message(s) as correct answer(s) and present an icon to it. More one message can be marked.

3) The author of question message can edit the subject (name or title of message, if you prefer), but can't change the status of be marked.

4) The author of answer message can edit the subject (name or title of message, if you prefer), but can't change the status of be marked.

5) Nobody see the flags that mark messages. Only Administrators can see.

6) Only Administrator can mark or unmark the message.

7) Any kind of character or sentence can be used to mark messages. (it needs changing in some lines of the code to reconize them).

8) Replies don't propagate the flags.

9) List and Thread modes don't show the flags.

10) Any image can be icons, respected the size. The files with image must be published. Inside the forum or out forum. (it needs changing in some lines of the code). If inside the forum, the gallery must has permission to be seen by anyone: registered or not.

Not developed:

1) automation to insertion of flags. It must be inserted manually, by administrator.

2) automation to clear the flags. It must be deleted manually, by administrator.

3) any kind of contabilization of score, bonus or other ressources.

note:
It's not the best code, and certainly it can be improved. Everyone are free to do it.

I reckon this code can be used in many others circustances than forum support.

A table with characteres, as flag, and images can mark many kind of message: important, new, admin, interrogation, attention ...

The first version, when the icon solved was at position of pinned icon, can be used to call attention to any message. Pinned or not the icon will be showed. The code to this was posted in NAML - free support section as append.

To this presentation I used as flags:

question: " ¢¬"

answer: " ¬"

call attention in pinned icon position: "New Year"









----------------------------------------------------------------------------------
Full code:

Two new macros used to clear flags:
<macro name="jsm_limpastr" dot_parameter="texto">
    <n.regex_replace_all. pattern=" ¢¬" replacement="">
        <n.texto/>
    </n.regex_replace_all.>
</macro>

<macro name="jsm_limpastr1" dot_parameter="texto">
    <n.regex_replace_all. pattern=" ¬" replacement="">
        <n.texto/>
    </n.regex_replace_all.>
</macro>
Icon in main page: 
<override_macro name="smart_post_link" requires="node" dot_parameter="href" parameters="text, title, class">
    <n.if.is_post>
        <then>
            <n.if.contains_substring string="[n.node_text.text/]" substring=" ¢¬">
           <then>
            <n.set_var. name="value"><n.node_text.text/></n.set_var.>
            <img src="http://jsmtstnaml.23557.n7.nabble.com/file/n83/checkmark.png" />&nbsp;<a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.jsm_limpastr texto="[n.var name='value'/]" /></a>
            <n.call_later value="[n.topic_node.id/]" param="markUnreadTopics"/>
                </then>
                <else>
             <a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.node_text.text/></a>
            <n.call_later value="[n.topic_node.id/]" param="markUnreadTopics"/>
                </else>
            </n.if.contains_substring>  
        </then>
        <else.node_link text="[n.text/]"/>
    </n.if.is_post>
</override_macro>
Icon in title of topic page:
<override_macro name="topic_header">
    <div id="topic-search-box" class="search-box float-right" style="padding:.5em 0">
        <n.page_node.search_box/>
    </div>
    <n.if.contains_substring string="[n.break_up.page_node.subject/]" substring=" ¢¬">
      <then>
          <n.set_var. name="value"><n.break_up.page_node.subject/></n.set_var.>
               <h1 id="post-title" class="adbayes-content" style="margin:0.25em 0 .8em"><img src="http://jsmtstnaml.23557.n7.nabble.com/file/n83/checkmark.png" />&nbsp;<n.jsm_limpastr texto="[n.var name='value'/]" /></h1>
      </then>
      <else>
    <h1 id="post-title" class="adbayes-content" style="margin:0.25em 0 .8em">
        <n.break_up.page_node.subject/>
    </h1>
         </else>
    </n.if.contains_substring>   
</override_macro>
Icons of messages in topic page:
<override_macro name="classic_subject_line" requires="node">
        <n.if.contains_substring string="[n.break_up.subject/]" substring="¬">
        <then>
            
            <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬">
                <then>
                 <n.set_var. name="value"><n.break_up.subject/></n.set_var.>   
                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                    <img src="http://jsmtstnaml.23557.n7.nabble.com/file/n81/iconsolucionado.png" />&nbsp;<n.jsm_limpastr1 texto="[n.var name='value'/]" />
                </h2>          
            </then>
            <else>
                <n.set_var. name="value"><n.break_up.subject/></n.set_var.>
                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                    <img src="http://jsmtstnaml.23557.n7.nabble.com/file/n80/iconsolucionado2.png" />&nbsp;<n.jsm_limpastr texto="[n.var name='value'/]" />
                </h2>
             </else>
            </n.if.contains_substring>
        </then>
        <else>
    <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
        <n.break_up.subject/>
    </h2>
        </else>
        </n.if.contains_substring>
</override_macro>
Trap in reply:
<override_macro name="new_post" parameters="page_name,mailing_list_etiquette,bottom,focus" requires="servlet">
    <n.node_page.>
        <n.handle_new_node_permission_error/>
        <n.if.not.is_submitted_form>
            <then> 
<n.set_var. name="value"><n.page_node.default_reply_subject/></n.set_var.>
<n.if.not.is_empty.var name="value">
<then>
        <n.if.contains_substring string="[n.page_node.default_reply_subject/]" substring="¬">
            <then>
                <n.if.contains_substring string="[n.page_node.default_reply_subject/]" substring=" ¬">
                    <then>
                        <n.set_var. name="value"><n.page_node.default_reply_subject/></n.set_var.>
                        <n.set_var. name="value1"><n.jsm_limpastr1 texto="[n.var name='value'/]" /></n.set_var.>
                        <n.subject_field.set_value value="[n.var name='value1'/]" />
                    </then>
                    <else>
                        <n.set_var. name="value"><n.page_node.default_reply_subject/></n.set_var.>
                        <n.set_var. name="value1"><n.jsm_limpastr texto="[n.var name='value'/]" /></n.set_var.>
                        <n.subject_field.set_value value="[n.var name='value1'/]" />
                    </else>
                </n.if.contains_substring>
           </then>
           <else>
                <n.subject_field.set_value value="[n.page_node.default_reply_subject/]" />
           </else>
         </n.if.contains_substring>    
</then>
<else>
         <n.subject_field.set_value value="[n.page_node.default_reply_subject/]" />
</else>
</n.if.not.is_empty.var>                
                <n.alert_field.set_value value="[n.page_node.alert_default_value/]" />
                <n.init_new_post_custom_fields/>
            </then>
            <else>
                <n.catch_exception. id="save-block">
                    <n.handle_anonymous_submit/>
                    <n.check_antispam_submit bypass="preview"/>
                    <n.check_recent_post_limit/>
                    <n.create_child_of_page_node commit="[n.not.is_preview/]">
                        <subject><n.subject_field.value/></subject>
                        <message><n.message_field.value/></message>
                        <is_html><n.html_format_field.value/></is_html>
                        <type><n.type_field.value/></type>
                        <kind>post</kind>
                        <do>
                            <n.remember_new_node/>
                            <n.if.not.is_preview>
                                <then>
                                    <n.save_post/>
                                    <n.save_new_post_custom_fields/>
                                    <n.new_node.send_node_as_email/>
                                </then>
                            </n.if.not.is_preview>
                        </do>
                    </n.create_child_of_page_node>
                    <n.if.not.is_preview>
                        <then>
                            <n.new_node.save_alert_field/>
                            <n.redirect_to.new_node.url/>
                        </then>
                    </n.if.not.is_preview>
                </n.catch_exception.>
            </else>
        </n.if.not.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><n.page_name/></n.title.>
                <n.focus/>
                <style type="text/css">
                    .title-row {
                        padding:.6em .8em;
                        font-weight:bold;
                    }
                    div.field-title {
                        margin-top: 0;
                    }
                </style>
            </head>
            <body>
    <n.if.contains_substring string="[n.page_node.subject/]" substring="¬">
      <then>
        <n.if.contains_substring string="[n.page_node.subject/]" substring=" ¬">
            <then>
                <n.set_var. name="value"><n.page_node.subject/></n.set_var.>
                <n.set_var. name="value1"><n.jsm_limpastr1 texto="[n.var name='value'/]" /></n.set_var.>
                <n.edit_header first_text="[n.page_name/]" second_text="[n.truncate. size='80'][n.var name='value1'/][/n.truncate.]" />
            </then>
            <else>
                <n.set_var. name="value"><n.page_node.subject/></n.set_var.>
                <n.set_var. name="value1"><n.jsm_limpastr texto="[n.var name='value'/]" /></n.set_var.>
                <n.edit_header first_text="[n.page_name/]" second_text="[n.truncate. size='80'][n.var name='value1'/][/n.truncate.]" />
            </else>
        </n.if.contains_substring>
    </then>
    <else>
        <n.edit_header first_text="[n.page_name/]" second_text="[n.truncate. size='80'][n.page_node.subject/][/n.truncate.]" />
    </else>
</n.if.contains_substring>
 
                <n.if.is_submitted_form>
                    <then>
                        <n.if.has_exception for="save-block">
                            <then.show_new_node_error/>
                            <else>
                                <n.if.is_preview>
                                    <then.new_node.preview/>
                                </n.if.is_preview>
                            </else>
                        </n.if.has_exception>
                    </then>
                </n.if.is_submitted_form>
 
                <n.subscription_reminder/>
 
                <n.form. onsubmit="return singleSubmit(this)">
                    <n.type_field.hidden/>
                    <n.mailing_list_notice.mailing_list_etiquette/>
 
                    <n.reply_form />
 
                    <div style="margin-top:1em">
                        <n.antispam_submit_button class="toolbar action-button" value="[t]Post Message[/t]"/>
                        <input type="submit" class="toolbar action-button" name="preview" value="[t]Preview Message[/t]"/>
                        <t>or</t>
                        <a href="[n.page_node.url /]"><t>Cancel</t></a>
                    </div>
                </n.form.>
 
                <n.hide_null.bottom/>
            </body>
        </n.html>
    </n.node_page.>
</override_macro>

<override_macro name="in_reply_to">
    <div class="title-row light-border-color shaded-bg-color" style="margin-top:2.5em"><t>In Reply To</t></div>
    <div style="margin-left:1.2em;padding-top:1em">
        <n.page_node.>
            <n.put_in_head.>
                <style type="text/css">
                    div.in-reply-to {
                        margin-bottom:1em;
                        padding-bottom:.4em;
                        border-bottom-width:1px;
                        border-bottom-style:dotted;
                    }
                </style>
            </n.put_in_head.>
            <div class="medium-border-color in-reply-to">
    <n.if.contains_substring string="[n.break_up.subject/]" substring="¬">
    <then>
        <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬">
            <then>
                <n.set_var. name="value"><n.break_up.subject/></n.set_var.>
                <n.set_var. name="value1"><n.jsm_limpastr1 texto="[n.var name='value'/]" /></n.set_var.>
                <b><n.var name='value1'/></b>
            </then>
            <else>
                <n.set_var. name="value"><n.break_up.subject/></n.set_var.>
                <n.set_var. name="value1"><n.jsm_limpastr texto="[n.var name='value'/]" /></n.set_var.>
                <b><n.var name='value1'/></b>
            </else>
        </n.if.contains_substring>
    </then>
    <else>
        <b><n.break_up.subject/></b>
    </else>
</n.if.contains_substring>
                <div class="weak-color" style="padding:.2em 0">
                    <span class="weak-color"><n.when_created.long_format/></span>
                    &mdash;
                    <t>by
                        <t.author>
                            <n.owner.avatar/>
                            <span class="nowrap"><n.owner.user_link/></span>
                        </t.author>
                    </t>
                </div>
            </div>
            <n.message_with_signature/>
        </n.page_node.>
    </div>
</override_macro>
Trap in Edition
<override_macro name="edit_post" requires="servlet">
    <n.node_page.>
        <n.if.not.visitor.can_edit.page_node>
            <then>
                <n.login.><t>Only authorized users can proceed in this area.</t></n.login.>
            </then>  
        </n.if.not.visitor.can_edit.page_node>
        <n.set_var. name="value1"><n.page_node.raw_subject/></n.set_var.>
        <n.if.not.is_submitted_form>
            <then>
                <n.if.visitor.is_site_admin>
                   <then>
                      <n.subject_field.set_value value="[n.page_node.raw_subject/]" />
                    </then>
                    <else>
                      <n.set_var. name="value"><n.jsm_limpastr texto="[n.var name='value1'/]" /></n.set_var.>
                      <n.set_var. name="value"><n.jsm_limpastr1 texto="[n.var name='value'/]" /></n.set_var.>
                      <n.subject_field.set_value value="[n.var name='value'/]" />
                    </else>
                </n.if.visitor.is_site_admin>  
                <n.html_format_field.set_value value="[n.page_node.message.is_html_format/]" />
                <n.message_field.set_value value="[n.page_node.message.as_editable/]" />
                <n.alert_field.set_value value="[n.page_node.visitor_is_subscribed_to_topic/]" />
                <n.page_node.init_edit_post_custom_fields/>
            </then>
            <else>
                <n.catch_exception. id="save-block">
                    <n.edit_page_node. commit="[n.not.is_preview/]">
                        <n.set_subject subject="[n.subject_field.value/]" />
                        <n.if.not.visitor.is_site_admin>
                            <then>
                               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬">
                                  <then>
                                     <n.set_subject subject="[n.subject_field.value/] ¬" />
                                  </then>
                               </n.if.contains_substring>
                               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¢¬">
                                  <then>
                                    <n.set_subject subject="[n.subject_field.value/] ¢¬" />
                                  </then>
                               </n.if.contains_substring>
                           </then>
                        </n.if.not.visitor.is_site_admin>
                        <n.set_message message="[n.message_field.value/]" is_html="[n.not.is_null.html_format_field.value/]" />
                        <n.if.not.is_preview>
                            <then.save_post />
                        </n.if.not.is_preview>
                    </n.edit_page_node.>
                    <n.if.not.is_preview>
                        <then>
                            <n.page_node.save_alert_field/>
                            <n.page_node.save_edit_post_custom_fields/>
                            <n.redirect_to.page_node.url/>
                        </then>
                    </n.if.not.is_preview>
                </n.catch_exception.>
            </else>
        </n.if.not.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><t>Edit Post</t></n.title.>
                <style type="text/css">
                    .title-row {
                        padding:.2em;
                        border-width:2px;
                        border-style:solid;
                        font-weight:bold;
                    }
                    div.field-title {
                        margin-top: 0;
                    }
                </style>
            </head>
            <body>
                <n.edit_header first_text="[t]Edit Post[/t]" second_text="[n.page_node.get_app_node.subject/]" />
                <n.if.is_submitted_form>
                    <then>
                        <n.if.is_preview>
                            <then>
                                <n.page_node.preview/>
                            </then>
                        </n.if.is_preview>
                        <n.show_edit_post_error/>
                    </then>
                </n.if.is_submitted_form>
                <n.form.>
                    <n.edit_post_form />
 
                    <div style="margin-top:1em">
                        <input type="submit" class="toolbar action-button" value="[t]Post Message[/t]" />
                        <input type="submit" class="toolbar action-button" name="preview" value="[t]Preview Message[/t]" />
                        <t>or</t> <a href="[n.page_node.url/]"><t>Cancel</t></a>
                    </div>
                </n.form.>
            </body>
        </n.html>
    </n.node_page.>
</override_macro>
Cleanning Flags in List and Thread mode (re-edited in 13/12/15 - 11:59 UT)
<override_macro name="post_subject" parameters="separator" requires="node">
    <n.set_var. name='parent_subject'>
        <n.if.has_parent>
            <then.parent_node.subject/>
        </n.if.has_parent>
    </n.set_var.>
    <n.if.not.ends_with text="[n.subject/]" suffix="[n.var name='parent_subject'/]">
        <then>
           <n.set_var. name="value"><n.subject/></n.set_var.>
<n.if.contains_substring string="[n.var name='value'/]" substring="¬">
   <then>
       <n.if.contains_substring string="[n.var name='value'/]" substring=" ¬">
         <then>
            <n.set_var. name="value1"><n.jsm_limpastr1 texto="[n.var name='value'/]" /></n.set_var.>
            <span class="post-subject adbayes-content"><img src="http://jsmtstnaml.23557.n7.nabble.com/file/n81/iconsolucionado.png" />&nbsp;<n.var name='value1'/><n.hide_null.separator/></span>
         </then>
         <else>
           <n.set_var. name="value1"><n.jsm_limpastr texto="[n.var name='value'/]" /></n.set_var.>
           <span class="post-subject adbayes-content"><img src="http://jsmtstnaml.23557.n7.nabble.com/file/n80/iconsolucionado2.png" />&nbsp;<n.var name='value1'/><n.hide_null.separator/></span> 
         </else>
       </n.if.contains_substring>
    </then>
   <else>
       <span class="post-subject adbayes-content"><n.var name='value'/><n.hide_null.separator/></span>
   </else>
</n.if.contains_substring>
        </then>
    </n.if.not.ends_with>
</override_macro>

Append


To show some icon at pinned área:
<override_macro name="pin_column">
    <n.table_column>
        <head>
            <td class="[n.column_default_border/] pin-column nowrap" style="width:24px"></td>
        </head>
        <body>
            <n.current_node.>
                <td class="[n.column_default_border/]" style="padding-left:.2em">
                    <n.if.is_app>
                        <then>
                            <n.if.is_pinned_in_loop>
                                <then><img src="/images/forum_pin.png" width="29" height="23" title="[t]Pinned sub-forum[/t]" alt="[t]Pinned sub-forum[/t]"/></then>
                                <else><img src="/images/forum.png" width="25" height="23" title="[t]Floating sub-forum[/t]" alt="[t]Floating sub-forum[/t]"/></else>
                            </n.if.is_pinned_in_loop>
                        </then>
                        <else>
                            <n.if.contains_substring string="[n.break_up.subject/]" substring="New Year">
                                <then>
                                     &nbsp;<img src="http://jsmtstnaml.23557.n7.nabble.com/file/n93/thumbsup.gif" width="25" height="20" alt="GoodNews"/>
                                </then>
                                <else>
                                    <n.if.is_pinned_in_loop>
                                         <then><img src="/images/pin.png" width="20" height="21" alt="pin"/></then>
                                    </n.if.is_pinned_in_loop>
                               </else>
                            </n.if.contains_substring>
                        </else>
                    </n.if.is_app>
                </td>
            </n.current_node.>
        </body>
    </n.table_column>
</override_macro>
Observatório de Astronomia de Vilatur - W. Herschel
Saquarema - RJ - Brasil
http://www.astronomia.pousadavilatur.com.br
Reply | Threaded
Open this post in threaded view
|

Re: Option to solve topics & Give XP

NiTEMARE
In reply to this post by jsmoraes
Hi again!

Really good work with the codes. However, the codes seems to not working when placing them into the NAML system. I get errors and so on.

But again. Thanks for your response to this idea!

- Timmie
The trick to creativity is knowing how to hide your sources - Albert Einstein.
Reply | Threaded
Open this post in threaded view
|

Re: Option to solve topics & Give XP

jsmoraes
This post was updated on .
I am surprised, because I tested it with two different computers, and logged with two different logins, and not logged.
May be I have forgotten to post some macro.

Can you describe the error? Or post ctrl+C plus ctrl+V of the error message ?

You can see the code working in my  forum http://astronomia-e-astrofotos.1069742.n5.nabble.com/ . I transfered all codes from my test forum to it. And did some adaptation to work only to highlight messages.
Observatório de Astronomia de Vilatur - W. Herschel
Saquarema - RJ - Brasil
http://www.astronomia.pousadavilatur.com.br
Reply | Threaded
Open this post in threaded view
|

Re: Option to solve topics & Give XP

jsmoraes
This post was updated on .
To close my contribution with the issue, I changed intentions of the code. Now, it is to highlight with icons messages only.
As I did some change with tool bar of Editor, and some code are togheter in same macro, I published all then:
New buttons in toll bar
New checkbox to hightlight icon

To don't forget someone, I published them as they appear to me in customized macro option of NAML editor.

The idea was include some unusual characters to act as flag to decision:

¬n¬ - icon new
¢ - icon check full
¬e¬ - icon !
¬h¬ - incon ?
¬a¬ - icon Admin

The code was only tested in classic forum type. App forum, Category, Board, Blog and News. I don't know if needs more changing in other macros.

The full code is working in http://astronomia.pousadavilatur.com.br
the zip file with the codes is attached.
naml_Astronomia-e-Astrofotos_20131219.zip

Some example of screen image:


















Macros changed:

blog_post_header
cell_link_and_star
classic_subject_line
edit_post
edit_post_form
editor_stylesheet
editor_subheaders_button
editor_toolbar
in_reply_to
message_control
new_post
news_title_row
pin_column
post_subject
smart_post_link
subcategories_column
topic_header

New Macros:

editor_fontcolor_button
editor_taghtml_button
editor_underline_button
jsm_checkbox
jsm_checkboxadm_field
jsm_checkboxexclama_field
jsm_checkboxfull_field
jsm_checkboxhelp_field
jsm_checkboxnew_field
jsm_checkboxnormal_field
jsm_gallery_node_link
jsm_limpamark_chkadm
jsm_limpamark_chkexclama
jsm_limpamark_chkfull
jsm_limpamark_chkhelp
jsm_limpamark_chknormal
jsm_limpamark_new

Full code:
The code with alteration is in bold.


<override_macro name="blog_post_header" requires="node">
    <div class="blog-header shaded-bg-color">
        <n.if.is_pinned_in_loop>
            <then>
                <div class="pinned"></div>
            </then>
        </n.if.is_pinned_in_loop>
        <div class="blog-date weak-color">
            <n.when_created.date_only/>
        </div>
        <div class="blog-title second-font adbayes-content">
            <n.jsm_gallery_node_link/>
            <n.star/>
        </div>
        <table class="blog-details weak-color">
            <tr>
                <td class="nowrap">
                    <n.owner.avatar size="small" border_class="medium-border-color"/>
                </td>
                <td class="nowrap">
                    <t>by <t.author.owner.name truncate="20"/></t>
                    @
                    <n.when_created.time_only/>
                    <n.if.is_in_subapp>
                        <then><t>in <t.location.italic.subapp_link_on_hover/></t></then>
                    </n.if.is_in_subapp>
                </td>
            </tr>
        </table>
    </div>
</override_macro>

<override_macro name="cell_link_and_star">
    <div class="adbayes-content"><n.jsm_gallery_node_link/> <n.star/></div>
</override_macro>

<override_macro name="classic_subject_line" requires="node">
        <n.if.contains_substring string="[n.break_up.subject/]" substring="¬">
              <then>
                   <n.set_var. name="value"><n.break_up.subject/></n.set_var.>
                   <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬n¬">
                            <then>                                                                
                                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                               <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/icone_new.gif" width="32" />&nbsp;<n.jsm_limpamark_new texto="[n.var name='value'/]" />
                               </h2>          
                          </then>
                   </n.if.contains_substring>
                   <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬¢¬">
                            <then>                                                                
                                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                               <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/success.png" width="14" />&nbsp;<n.jsm_limpamark_chkfull texto="[n.var name='value'/]" />
                               </h2>          
                          </then>
                   </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬.¬">
                            <then>                                                                
                                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                               <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconmark.png"  />&nbsp;<n.jsm_limpamark_chknormal texto="[n.var name='value'/]" />
                               </h2>          
                          </then>
                   </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬h¬">
                            <then>                                                                
                                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                               <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconehelp.png" width="16" />&nbsp;<n.jsm_limpamark_chkhelp texto="[n.var name='value'/]" />
                               </h2>          
                          </then>
                   </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬e¬">
                            <then>                                                                
                                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                               <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconexclama.png"  width="16"/>&nbsp;<n.jsm_limpamark_chkexclama texto="[n.var name='value'/]" />
                               </h2>          
                          </then>
                   </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬a¬">
                            <then>                                                                
                                <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                               <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconadmin.png"  />&nbsp;<n.jsm_limpamark_chkadm texto="[n.var name='value'/]" />
                               </h2>          
                          </then>
                   </n.if.contains_substring>
                  
              </then>
              <else>
                 <h2 class="post-subject float-left adbayes-content" style="width:30%;overflow:visible;font-family:inherit">
                 <n.break_up.subject/>
                 </h2>
             </else>
        </n.if.contains_substring>
</override_macro>

<override_macro name="edit_post" requires="servlet">
    <n.node_page.>
        <n.if.not.visitor.can_edit.page_node>
            <then>
                <n.login.><t>Only authorized users can proceed in this area.</t></n.login.>
            </then>  
        </n.if.not.visitor.can_edit.page_node>
        <n.set_var. name="value1"><n.page_node.raw_subject/></n.set_var.>
        <n.set_var. name="value"><n.page_node.raw_subject/></n.set_var.>
        <n.if.not.is_submitted_form>
            <then>
                  <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬n¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_new texto="[n.var name='value1'/]" /></n.set_var.>
              </then>
                    </n.if.contains_substring>
                    <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬¢¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkfull texto="[n.var name='value1'/]" /></n.set_var.>
              </then>
                     </n.if.contains_substring>    
              <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬.¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chknormal texto="[n.var name='value1'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬h¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkhelp texto="[n.var name='value1'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬e¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkexclama texto="[n.var name='value1'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬a¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkadm texto="[n.var name='value1'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                <n.subject_field.set_value value="[n.var name='value'/]" />
  
                <n.html_format_field.set_value value="[n.page_node.message.is_html_format/]" />
                <n.message_field.set_value value="[n.page_node.message.as_editable/]" />
                <n.alert_field.set_value value="[n.page_node.visitor_is_subscribed_to_topic/]" />
                <n.page_node.init_edit_post_custom_fields/>
            </then>
            <else>
                <n.catch_exception. id="save-block">
                    <n.edit_page_node. commit="[n.not.is_preview/]">
 
                        <n.set_var. name="marksfinal"></n.set_var.>
                        <n.if.jsm_checkboxnew_field.is_checked>
                                   <then>
                                       <n.set_var. name="marksfinal">¬n¬</n.set_var.>                                 
                                   </then>
                        </n.if.jsm_checkboxnew_field.is_checked>
                        <n.if.jsm_checkboxfull_field.is_checked>
                                   <then>
                                       <n.set_var. name="marksfinal">¬¢¬</n.set_var.>                                 
                                   </then>
                        </n.if.jsm_checkboxfull_field.is_checked>
                        <n.if.jsm_checkboxnormal_field.is_checked>
                                   <then>
                                       <n.set_var. name="marksfinal">¬.¬</n.set_var.>                                 
                                   </then>
                        </n.if.jsm_checkboxnormal_field.is_checked>                       
                        <n.if.jsm_checkboxhelp_field.is_checked>
                                   <then>
                                       <n.set_var. name="marksfinal">¬h¬</n.set_var.>                                 
                                   </then>
                        </n.if.jsm_checkboxhelp_field.is_checked>                       
                         <n.if.jsm_checkboxexclama_field.is_checked>
                                   <then>
                                       <n.set_var. name="marksfinal">¬e¬</n.set_var.>                                 
                                   </then>
                        </n.if.jsm_checkboxexclama_field.is_checked>
                        
                         <n.if.visitor.is_site_admin>
                              <then>                        
                                <n.if.jsm_checkboxadm_field.is_checked>
                                   <then>
                                       <n.set_var. name="marksfinal">¬a¬</n.set_var.>                                 
                                   </then>
                                </n.if.jsm_checkboxadm_field.is_checked>
                             </then>
                        </n.if.visitor.is_site_admin>                       
 
                        <n.if.equal value1="[n.var name='marksfinal'/]" value2="">
                            <then>
                                <n.set_subject subject="[n.subject_field.value/]" />
                            </then>
                            <else>
                                 <n.set_subject subject="[n.subject_field.value/] [n.var name='marksfinal'/]" />
                            </else>
                        </n.if.equal>
                        
 
                        <n.set_message message="[n.message_field.value/]" is_html="[n.not.is_null.html_format_field.value/]" />
                        <n.if.not.is_preview>
                            <then.save_post />
                        </n.if.not.is_preview>
                    </n.edit_page_node.>
                    <n.if.not.is_preview>
                        <then>
                            <n.page_node.save_alert_field/>
                            <n.page_node.save_edit_post_custom_fields/>
                            <n.redirect_to.page_node.url/>
                        </then>
                    </n.if.not.is_preview>
                </n.catch_exception.>
            </else>
        </n.if.not.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><t>Edit Post</t></n.title.>
                <style type="text/css">
                    .title-row {
                        padding:.2em;
                        border-width:2px;
                        border-style:solid;
                        font-weight:bold;
                    }
                    div.field-title {
                        margin-top: 0;
                    }
                </style>
            </head>
            <body>
                <n.edit_header first_text="[t]Edit Post[/t]" second_text="[n.page_node.get_app_node.subject/]" />
                <n.if.is_submitted_form>
                    <then>
                        <n.if.is_preview>
                            <then>
                                <n.page_node.preview/>
                            </then>
                        </n.if.is_preview>
                        <n.show_edit_post_error/>
                    </then>
                </n.if.is_submitted_form>
                <n.form.>
                    <n.edit_post_form />
 
                    <div style="margin-top:1em">
                        <input type="submit" class="toolbar action-button" value="[t]Post Message[/t]" />
                        <input type="submit" class="toolbar action-button" name="preview" value="[t]Preview Message[/t]" />
                        <t>or</t> <a href="[n.page_node.url/]"><t>Cancel</t></a>
                    </div>
                </n.form.>
            </body>
        </n.html>
    </n.node_page.>
</override_macro>

<override_macro name="edit_post_form">
    <n.if.page_node.is_mail_to_list>
        <then>
            <div class="title-row info-message" style="font-weight:normal;padding:.3em .5em">
                <div class="important" style="font-weight:bold">
                    <t>Your changes will not be sent to the mailing list.</t>
                </div>
                <t>If you want others in the mailing list to know of your changes,
                    please compose a new message or reply to your original message.</t>
            </div>
        </then>
    </n.if.page_node.is_mail_to_list>
 
    <n.if.not.visitor.is_registered>
        <then>
            <div class="field-box light-border-color">
                <div class="second-font field-title"><t>Your Name</t></div>
                <div class="weak-color">
                    <n.page_node.owner.name/>
                </div>
            </div>
        </then>
    </n.if.not.visitor.is_registered>
 
    <div class="field-box light-border-color">
        <div class="second-font field-title"><t>Subject</t></div>
        <div class="weak-color">
            <n.subject_field.input size="60" tabindex="1" />
        </div>
    </div>
 
    <div class="field-box light-border-color">
        <div class="second-font field-title"><t>Message</t></div>
        <div class="weak-color">
            <n.if.visitor.is_registered>
                <then>
                    <n.html_format_field.checkbox />
                    <label for="[n.html_format_field.name/]"><t>Message is in HTML Format</t></label>
&nbsp;|&nbsp;
                    <n.jsm_checkboxnew_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/icone_new.gif" title="[t]Novo[/t]" alt="[t]Novo[/t]"/></label>
                    </n.jsm_checkboxnew_field.>
                    
                    <n.jsm_checkboxfull_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/success.png" title="[t]Cheio[/t]" alt="[t]Cheio[/t]"/></label>
                    </n.jsm_checkboxfull_field.>
                    
                    <n.jsm_checkboxnormal_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconmark.png" title="[t]Normal[/t]" alt="[t]Normal[/t]"/></label>
                    </n.jsm_checkboxnormal_field.>
                    
                    <n.jsm_checkboxhelp_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconehelp.png" title="[t]Ajuda[/t]" alt="[t]Ajuda[/t]"/></label>
                    </n.jsm_checkboxhelp_field.>
                    
                    <n.jsm_checkboxexclama_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconexclama.png" title="[t]Exclamação[/t]" alt="[t]Exclamação[/t]"/></label>
                    </n.jsm_checkboxexclama_field.>
                    
                    <n.if.visitor.is_site_admin>
                        <then>
                              <n.jsm_checkboxadm_field.>
                                  <n.jsm_checkbox/>
                                  <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconadmin.png" title="[t]Admin[/t]" alt="[t]Admin[/t]"/></label>
                              </n.jsm_checkboxadm_field.>
                        </then>
                    </n.if.visitor.is_site_admin>                    
                    
                    <br/>
                    <div style="margin:.1em 0">
                        <n.editor_toolbar
                            textarea_id="[n.message_field.name/]"
                            original_text="[n.if.page_node.parent_node.is_post][then.page_node.parent_node.message_quoted/][/n.if.page_node.parent_node.is_post]"
                            node_id="[n.page_node.id/]"
                        />
                    </div>
                </then>
            </n.if.visitor.is_registered>
            <n.message_field.textarea wrap="SOFT" tabindex="2" style="min-width:30em;max-width:57em;width:100%;height:20em;" />
 
            <n.edit_post_extra_fields/>
        </div>
    </div>
</override_macro>
<macro name="editor_fontcolor_button">
        <n.put_in_head.>
        <script type="text/javascript">
            Nabble.fontecorDropdown = function() {
                Nabble.closeWindows();
                $('#corfonte-dropdown').show();
            };
        </script>
    </n.put_in_head.>
 
    <td class="has-dropdown">
        <div id="corfonte-dropdown" class="editor-dropdown medium-border-color light-bg-color drop-shadow" style="padding:.5em;width:12em;margin-left:-5em">
            <h2><t>Cor da Fonte</t></h2>
            <div style="margin:.5em 0 1em;">
                <button type="button" onclick="Nabble.insert('font color=red')" class="toolbar" style="height:1.65em" title="[t]Texto Vermelho[/t]">
                <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontred.png"/>
                </button>
                <button type="button" onclick="Nabble.insert('font color=green')" class="toolbar" style="height:1.65em" title="[t]Texto Verde[/t]">
                <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontgreen.png"/>
          </button>
                <button type="button" onclick="Nabble.insert('font color=blue')" class="toolbar" style="height:1.65em" title="[t]Texto Azul[/t]">
                <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontblue.png"/>
          </button>
                <button type="button" onclick="Nabble.insert('font color=yellow')" class="toolbar" style="height:1.65em" title="[t]Texto Amarelo[/t]">
                <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontyellowA.png"/>
          </button>
                <button type="button" onclick="Nabble.insert('font color=white')" class="toolbar" style="height:1.65em" title="[t]Texto Branco[/t]">
                <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontwhite.png"/>
          </button>
            </div>
        </div>
        <button type="button" class="toolbar" onclick="Nabble.fontecorDropdown()">
            <t>Cor Fonte</t><img src="/images/more.png" width="10" height="10"/>
        </button>
    </td>
</macro>
<override_macro name="editor_stylesheet">
    <style type="text/css">
        div.editor-dropdown {
            margin-top:1.8em;
            position:absolute;
            display:none;
            z-index:1000;
            border-width:1px;
            border-style:solid;
        }
        .nabble div.toolbar {
            min-width:30em;
            max-width:57em;
            width:100%;
            padding:.1em;
        }
        table.toolbar {
            border-spacing:0;
        }
        table.toolbar td {
            padding:0;
        }
        button {
            white-space:nowrap;
        }
        div > h2 {
            margin:0;
            padding:0;
        }
    </style>
</override_macro>

<override_macro name="editor_subheaders_button">
    <n.put_in_head.>
        <script type="text/javascript">
            Nabble.headersDropdown = function() {
                Nabble.closeWindows();
                $('#headers-dropdown').show();
            };
 
           
             Nabble.jsmbullet = function(vartxt) {
                var textarea = Nabble.get(textareaID);
                {
                    this.setSelection( textarea, vartxt );
                }
                textarea.focus();
            };
        </script>
    </n.put_in_head.>
 
    <td class="has-dropdown">
        <div id="headers-dropdown" class="editor-dropdown medium-border-color light-bg-color drop-shadow" style="padding:.5em;width:25em;margin-left:-15em">
            <h2><t>Instruções</t></h2>
            <t><t.example1.bold text="&lt;código html&gt;SEU TEXTO&lt;/código html&gt;"/></t> <br/>
            <t> o <t.example2.bold text="TEXTO"/> pode estar previamente selecionado.</t>
            <div style="margin:.5em 0 1em;">
                <t>Títulos</t>
                <button type="button" class="toolbar" onclick="Nabble.insert('h2')"><t>H2</t></button>
                <button type="button" class="toolbar" onclick="Nabble.insert('h3')"><t>H3</t></button>
                <button type="button" class="toolbar" onclick="Nabble.insert('h4')"><t>H4</t></button>
                <button type="button" class="toolbar" onclick="Nabble.insert('h5')"><t>H5</t></button>
                <button type="button" class="toolbar" onclick="Nabble.insert('h6')"><t>H6</t></button>
            </div>
            <div style="margin:.5em 0 1em;">
          <t>Alinhamento</t>
                <button type="button" onclick="Nabble.insert('span style=display:block;text-align:left')" class="toolbar" style="height:1.65em" title="[t]Esquerda[/t]">
                    <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_left.png"/>
                </button>
                <button type="button" onclick="Nabble.insert('span style=display:block;text-align:center')" class="toolbar" style="height:1.65em" title="[t]Centralizado[/t]">
                    <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_center.png"/>
                </button>
                <button type="button" onclick="Nabble.insert('span style=display:block;text-align:right')" class="toolbar" style="height:1.65em" title="[t]Direita[/t]">
                    <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_right.png"/>
                </button>
                <button type="button" onclick="Nabble.insert('span style=display:block;text-align:justify')" class="toolbar" style="height:1.65em" title="[t]Justificado[/t]">
                    <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_justify.png"/>
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&nbsp;&nbsp;&nbsp;&nbsp;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Indentar/TAB[/t]">
                  <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_indenta.png"/>
                </button>
            </div>
            <div style="margin:.5em 0 1em;">
                <t>Tamanho Fonte</t>
                <button type="button" onclick="Nabble.insert('font size=-2')" class="toolbar bold" style="height:1.65em" title="[t]Fonte Menor[/t]">
           <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontPeq.png"/>
                </button>
                <button type="button" onclick="Nabble.insert('font size=+1')" class="toolbar bold" style="height:1.65em" title="[t]Fonte Maior[/t]">
           <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontMaior.png"/>
                </button>   
            </div>
            <div style="margin:.5em 0 1em;">
                <t>Especial</t>
                <button type="button" onclick="Nabble.insert('span style=vertical-align:sub')" class="toolbar bold" style="height:1.65em" title="[t]Posição Sub[/t]">
           <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontSub.png"/>
                </button>
                <button type="button" onclick="Nabble.insert('span style=vertical-align:super')" class="toolbar bold" style="height:1.65em" title="[t]Posição Sup[/t]">
           <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_fontSup.png"/>
                </button>
            </div>
            <div style="margin:.5em 0 1em;">
                <t>Inserir</t>
                <button type="button" onclick="Nabble.jsmbullet('&#149;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Bullet[/t]">
                  &#149;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#169;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Copyright[/t]">
                  &#169;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#174;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Registrado[/t]">
                  &#174;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#181;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Micro[/t]">
                  &#181;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&lt;' + 'img src=' + &quot; 'http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/pi8.png'  &quot; +  '/' + '&gt;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Pi[/t]">
                  <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/pi8.png"/>
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#8470;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]No.[/t]">
                  &#8470;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#8592;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Seta Esq[/t]">
                  &#8592;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#8594;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Seta Dir[/t]">
                  &#8594;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#186;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Grau[/t]">
                  &#186;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#170;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]Primeira[/t]">
                  &#170;
                </button>
               <button type="button" onclick="Nabble.jsmbullet('&#177;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]+ou-[/t]">
                  &#177;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&#x2260;');Nabble.closeWindows()" class="toolbar bold" style="height:1.65em" title="[t]+ou-[/t]">
                  &#x2260;
                </button>
            </div>
            
        </div>
        <button type="button" class="toolbar" onclick="Nabble.headersDropdown()">
            <t>Formatar Texto</t><img src="/images/more.png" width="10" height="10"/>
        </button>
    </td>
</override_macro>

<macro name="editor_taghtml_button">
        <n.put_in_head.>
        <script type="text/javascript">
            Nabble.taghtmlDropdown = function() {
                Nabble.closeWindows();
                $('#codigohtml-dropdown').show();
            };
            
          Nabble.jsmbullet = function(vartxt) {
                var textarea = Nabble.get(textareaID);
                {
                    this.setSelection( textarea, vartxt );
                }
                textarea.focus();
            };
        </script>
    </n.put_in_head.>
 
    <td class="has-dropdown">
        <div id="codigohtml-dropdown" class="editor-dropdown medium-border-color light-bg-color drop-shadow" style="padding:.5em;width:12em;margin-left:-5em">
            <h3><t>Edição modo HTML</t></h3>
            <div style="margin:.5em 0 1em;">
                <button type="button" onclick="Nabble.insert('p')" class="toolbar" style="height:1.65em" title="&lt;[t]p[/t]&gt;">
                &lt;p&gt;
                </button>
                <button type="button" onclick="Nabble.insert('ul')" class="toolbar" style="height:1.65em" title="Lista Bullet">
                &lt;ul&gt;
                </button>
                <button type="button" onclick="Nabble.insert('ol')" class="toolbar" style="height:1.65em" title="Lista Numérica">
                &lt;ol&gt;
                </button>
                <button type="button" onclick="Nabble.insert('li')" class="toolbar" style="height:1.65em" title="Item Lista">
                &lt;li&gt;
                </button>                             
            </div>
            <div style="margin:.5em 0 1em;">
                <button type="button" onclick="Nabble.jsmbullet('&lt;br/&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="&lt;[t]br[/t]&gt;&nbsp;(elimine tag /p anterior)">
                &lt;br&gt;
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&lt;hr/&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="&lt;[t]hr[/t]&gt;">
                &lt;hr&gt;
                </button>
                <button type="button" onclick="Nabble.insert('center')" class="toolbar" style="height:1.65em" title="Centralização Simples">
                Center
                </button>
            </div>
           <div style="margin:.5em 0 1em;"> 
                <button type="button" onclick="Nabble.jsmbullet('&lt;table border=&quot;1&quot;&nbsp;width=&quot;auto&quot;&gt;  \r\n  &lt;caption&gt;Caption&lt;/caption&gt;  \r\n  &lt;th&gt;Título1&lt;/th&gt; \r\n  &lt;th&gt;Título2&lt;/th&gt;  \r\n  &lt;tr height=&quot;auto&quot;&gt;  \r\n   &lt;td align=&quot;center&quot; valign=&quot;center&quot; colspan=&quot;0&quot; rowspan=&quot;0&quot;&gt;célula1&lt;/td&gt;  \r\n   &lt;td align=&quot;center&quot; valign=&quot;center&quot; colspan=&quot;0&quot; rowspan=&quot;0&quot;&gt;célula1&lt;/td&gt;  \r\n  &lt;/tr&gt;  \r\n&lt;/table&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="Tabela Padrão">
                Tabela
                </button>
               <button type="button" onclick="Nabble.jsmbullet('&lt;div id=&quot;nomedodiv&quot; style=&quot;z-index:2;position:relative;left:0px;top:0px;background-color:orange;color:white;width=auto;padding:0 0 0 0;margin:0 0 0 0;height:auto;border:blue 1px solid;align:left&quot;&gt;Texto do Div Texto do Div Texto do Div&lt;/div&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="DIV (position-border)">DIV-1
                </button>
               <button type="button" onclick="Nabble.jsmbullet('&lt;div id=&quot;nomedodiv&quot; style=&quot;z-index:2;position:relative;left:0px;top:0px;background-color:orange;color:white;width=auto;padding:0 0 0 0;margin:0 0 0 0;height:auto;border-radius: 10px;align:right;font-size:80%;text-align:center&quot;&gt;Texto do Div Texto do Div Texto do Div&lt;/div&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="DIV (position-border-text center-font size">DIV-2
                </button>
            </div>
            <div style="margin:.5em 0 1em;">
                <button type="button" onclick="Nabble.jsmbullet('&lt;div style=&quot;clear:both;float:right;width:auto;height:auto;margin:0 0 0 0;padding:0 0 0 0;font-size:80%;text-align:center;border:blue 1px solid; background-color:yellow;color:green&quot;&gt;Texto do Div Texto do Div Texto do Div&lt;/div&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="DIV Float (border-text center-font size">DIV-3
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&lt;div style=&quot;position:absolute;left:150px;top:150px;width:auto;height:auto;margin:0 0 0 0;padding:0 0 0 0;font-size:80%;border:blue 1px solid;text-align:center; background-color:yellow;color:green&quot;&gt;Texto do Div Texto do Div Texto do Div&lt;/div&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="DIV Position (border-text center-font size)">DIV-4
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&lt;div style=&quot;display:inline;margin:0 0 0 0;padding:0 0 0 0;font-size:80%;width:auto;height:auto;border:blue 1px solid; background-color:yellow;color:green&quot;&gt;Texto do Div Texto do Div Texto do Div&lt;/div&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="DIV InLine  (border-text center-font size)">DIV-5
                </button>
            </div>
            <div style="margin:.5em 0 1em;">
                <button type="button" onclick="Nabble.jsmbullet('&lt;div style=&quot;display:block;width:auto;height:auto;margin:0 0 0 0;padding:0 0 0 0;text-align:center;font-size:80%;border:blue 1px solid;background-color:yellow;color:green&quot;&gt;Texto do Div Texto do Div Texto do Div&lt;/div&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="DIV Block (border-text center-font size)">DIV-6
                </button>
                <button type="button" onclick="Nabble.jsmbullet('&lt;div style=&quot;display:table-cell;text-align:center;vertical-align:middle;width:auto;font-size:80%;margin:0 0 0 0;padding:0 0 0 0; background-color:#ff8800; color: #fff;height:80px;border-radius: 10px&quot;&gt;Texto do Div Texto do Div Texto do Div&lt;/div&gt;');Nabble.closeWindows()" class="toolbar" style="height:1.65em" title="DIV TableCell">DIV-7
                </button>
            </div>
        </div>
        <button type="button" class="toolbar" onclick="Nabble.taghtmlDropdown()">
            <t>Tag HTML</t><img src="/images/more.png" width="10" height="10"/>
        </button>
    </td>
</macro>
<override_macro name="editor_toolbar" parameters="textarea_id, original_text, node_id">
    <n.put_in_head.>
        <n.editor_stylesheet/>
        <n.editor_shared_scripts textarea_id="[n.textarea_id/]" node_id="[n.node_id/]"/>
        <script type="text/javascript" src="/util/minmax.js"></script>
    </n.put_in_head.>
    
    <div class="toolbar rounded-top shaded-bg-color">
        <table class="toobar">
            <tr>
                <n.editor_quote_button original_text="[n.original_text/]"/>
                <n.editor_insert_image_button/>
                <n.editor_bold_button/>
                <n.editor_italic_button/>
                <n.editor_link_button/>
                <n.editor_smiley_button/>
                <n.editor_subheaders_button/>
                <n.editor_embed_button/>
                <n.editor_more_options_button/>
                <n.editor_underline_button/>
                <n.editor_fontcolor_button/>
                <n.editor_taghtml_button/>
            </tr>
        </table>
    </div>
</override_macro>
<macro name="editor_underline_button">
    <td class="nowrap">
        <button type="button" onclick="Nabble.insert('span style=text-decoration:underline')" class="toolbar" style="height:1.65em" title="[t]Sublinhado[/t]">
            <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1264/bt_underline.png"/>
        </button>
        <n.tooltip use_title="true"/>
    </td>
</macro>
<override_macro name="in_reply_to">
    <div class="title-row light-border-color shaded-bg-color" style="margin-top:2.5em"><t>In Reply To</t></div>
    <div style="margin-left:1.2em;padding-top:1em">
        <n.page_node.>
            <n.put_in_head.>
                <style type="text/css">
                    div.in-reply-to {
                        margin-bottom:1em;
                        padding-bottom:.4em;
                        border-bottom-width:1px;
                        border-bottom-style:dotted;
                    }
                </style>
            </n.put_in_head.>
            <div class="medium-border-color in-reply-to">
    <n.set_var. name="value"><n.break_up.subject/></n.set_var.>
    <n.set_var. name="value1"><n.break_up.subject/></n.set_var.>
    <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬n¬">
      <then>
         <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/icone_new.gif" />&nbsp;<n.jsm_limpamark_new texto="[n.var name='value1'/]" /></n.set_var.>
      </then>
   </n.if.contains_substring>
   <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬¢¬">
      <then>
          <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/success.png" />&nbsp;<n.jsm_limpamark_chkfull texto="[n.var name='value1'/]" /></n.set_var.>
      </then>
   </n.if.contains_substring>    
   <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬.¬">
      <then>
          <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconmark.png" />&nbsp;<n.jsm_limpamark_chknormal texto="[n.var name='value1'/]" /></n.set_var.>
      </then>
   </n.if.contains_substring>
<n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬h¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconehelp.png" />&nbsp;<n.jsm_limpamark_chkhelp texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬e¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconexclama.png" />&nbsp;<n.jsm_limpamark_chkexclama texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬a¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconadmin.png" />&nbsp;<n.jsm_limpamark_chkadm texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
 
        <b><n.var name='value'/></b>
 
                <div class="weak-color" style="padding:.2em 0">
                    <span class="weak-color"><n.when_created.long_format/></span>
                    &mdash;
                    <t>by
                        <t.author>
                            <n.owner.avatar/>
                            <span class="nowrap"><n.owner.user_link/></span>
                        </t.author>
                    </t>
                </div>
            </div>
            <n.message_with_signature/>
        </n.page_node.>
    </div>
</override_macro>
<macro name="jsm_checkbox" parameters="style,jsm_id,jsm_nome" requires="field">
    <input id="[n.name/]" type="checkbox" name="[n.name/]" value="[n.true/]" checked="[n.false_to_null.value/]" style="[n.style/]"/>
</macro>

<macro name="jsm_checkboxadm_field" dot_parameter="do">
    <n.field. name="jsm_mark_adm"><n.do/></n.field.>
</macro>

<macro name="jsm_checkboxexclama_field" dot_parameter="do">
    <n.field. name="jsm_mark_exclama"><n.do/></n.field.>
</macro>

<macro name="jsm_checkboxfull_field" dot_parameter="do">
    <n.field. name="jsm_mark_full"><n.do/></n.field.>
</macro>

<macro name="jsm_checkboxhelp_field" dot_parameter="do">
    <n.field. name="jsm_mark_help"><n.do/></n.field.>
</macro>

<macro name="jsm_checkboxnew_field" dot_parameter="do">
    <n.field. name="jsm_mark_novo"><n.do/></n.field.>
</macro>

<macro name="jsm_checkboxnormal_field" dot_parameter="do">
    <n.field. name="jsm_mark_normal"><n.do/></n.field.>
</macro>

<macro name="jsm_gallery_node_link" requires="node" dot_parameter="href" parameters="text, title, class">
                   <n.set_var. name="value"><n.node_text.text/></n.set_var.>
                   <n.set_var. name="value1"></n.set_var.>
                   <n.if.contains_substring string="[n.node_text.text/]" substring=" ¬n¬">
                            <then>
                                <n.set_var. name="value1"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/icone_new.gif" width="32" />&nbsp;</n.set_var.>
                                <n.set_var. name="value"><n.jsm_limpamark_new texto="[n.node_text.text/]" /></n.set_var.>
                          </then>
                   </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.node_text.text/]" substring=" ¬¢¬">
                            <then>
                                <n.set_var. name="value1"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/success.png" width="14" />&nbsp;</n.set_var.>
                                <n.set_var. name="value"><n.jsm_limpamark_chkfull texto="[n.node_text.text/]" /></n.set_var.>
                          </then>
                   </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.node_text.text/]" substring=" ¬.¬">
                            <then>
                                <n.set_var. name="value1"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconmark.png" />&nbsp;</n.set_var.>
                                <n.set_var. name="value"><n.jsm_limpamark_chknormal texto="[n.node_text.text/]" /></n.set_var.>
                          </then>
                   </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.node_text.text/]" substring=" ¬h¬">
                            <then>
                                <n.set_var. name="value1"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconehelp.png" />&nbsp;</n.set_var.>
                                <n.set_var. name="value"><n.jsm_limpamark_chkhelp texto="[n.node_text.text/]" /></n.set_var.>
                          </then>
                   </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.node_text.text/]" substring=" ¬e¬">
                            <then>
                                <n.set_var. name="value1"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconexclama.png" />&nbsp;</n.set_var.>
                                <n.set_var. name="value"><n.jsm_limpamark_chkexclama texto="[n.node_text.text/]" /></n.set_var.>
                          </then>
                   </n.if.contains_substring>
 
 
                   <n.if.contains_substring string="[n.node_text.text/]" substring=" ¬a¬">
                            <then>
                                <n.set_var. name="value1"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconadmin.png" />&nbsp;</n.set_var.>
                                <n.set_var. name="value"><n.jsm_limpamark_chkadm texto="[n.node_text.text/]" /></n.set_var.>
                          </then>
                   </n.if.contains_substring>
                   <n.var name='value1'/><a href="[n.node_href.href/]" title="[n.title/]" class="[n.class/]"><n.var name='value'/></a>
</macro>

<macro name="jsm_limpamark_chkadm" dot_parameter="texto">
    <n.regex_replace_all. pattern=" ¬a¬" replacement="">
        <n.texto/>
    </n.regex_replace_all.>
</macro>

<macro name="jsm_limpamark_chkexclama" dot_parameter="texto">
    <n.regex_replace_all. pattern=" ¬e¬" replacement="">
        <n.texto/>
    </n.regex_replace_all.>
</macro>

<macro name="jsm_limpamark_chkfull" dot_parameter="texto">
    <n.regex_replace_all. pattern=" ¬¢¬" replacement="">
        <n.texto/>
    </n.regex_replace_all.>
</macro>

<macro name="jsm_limpamark_chkhelp" dot_parameter="texto">
    <n.regex_replace_all. pattern=" ¬h¬" replacement="">
        <n.texto/>
    </n.regex_replace_all.>
</macro>

<macro name="jsm_limpamark_chknormal" dot_parameter="texto">
    <n.regex_replace_all. pattern=" ¬.¬" replacement="">
        <n.texto/>
    </n.regex_replace_all.>
</macro>

<macro name="jsm_limpamark_new" dot_parameter="texto">
    <n.regex_replace_all. pattern=" ¬n¬" replacement="">
        <n.texto/>
    </n.regex_replace_all.>
</macro>
<override_macro name="message_control" requires="node_page">
    <div class="field-box light-border-color">
        <div class="second-font field-title"><t>Message</t></div>
        <div class="weak-color">
            <n.if.visitor.is_registered>
                <then>
                    <n.html_format_field.checkbox />
                    <label for="[n.html_format_field.name/]"><t>Message is in HTML Format</t></label>
                    &nbsp;|&nbsp;
                    <n.jsm_checkboxnew_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/icone_new.gif" title="[t]Novo[/t]" alt="[t]Novo[/t]"/></label>
                    </n.jsm_checkboxnew_field.>
                    
                    <n.jsm_checkboxfull_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/success.png" title="[t]Cheio[/t]" alt="[t]Cheio[/t]"/></label>
                    </n.jsm_checkboxfull_field.>
                    
                    <n.jsm_checkboxnormal_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconmark.png" title="[t]Normal[/t]" alt="[t]Normal[/t]"/></label>
                    </n.jsm_checkboxnormal_field.>
                    
                    <n.jsm_checkboxhelp_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconehelp.png" title="[t]Ajuda[/t]" alt="[t]Ajuda[/t]"/></label>
                    </n.jsm_checkboxhelp_field.>
                    
                    <n.jsm_checkboxexclama_field.>
                        <n.jsm_checkbox/>
                        <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconexclama.png" title="[t]Exclamação[/t]" alt="[t]Exclamação[/t]"/></label>
                    </n.jsm_checkboxexclama_field.>
                    
                    <n.if.visitor.is_site_admin>
                        <then>
                              <n.jsm_checkboxadm_field.>
                                  <n.jsm_checkbox/>
                                  <label for="[n.name/]"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconadmin.png" title="[t]Admin[/t]" alt="[t]Admin[/t]"/></label>
                              </n.jsm_checkboxadm_field.>
                        </then>
                    </n.if.visitor.is_site_admin>                     
                    <br/>
                    <div style="margin:.1em 0">
                        <n.editor_toolbar
                            textarea_id="[n.message_field.name/]"
                            original_text="[n.if.page_node.is_post][then.page_node.message_quoted/][/n.if.page_node.is_post]"
                        />
                    </div>
                </then>
            </n.if.visitor.is_registered>
            <n.message_field.textarea wrap="SOFT" tabindex="2" style="min-width:30em;max-width:57em;width:100%;height:20em;" />
            <n.new_post_extra_fields/>
        </div>
    </div>
</override_macro>

<override_macro name="new_post" parameters="page_name,mailing_list_etiquette,bottom,focus" requires="servlet">
    <n.node_page.>
        <n.handle_new_node_permission_error/>
        <n.if.not.is_submitted_form>
            <then>
                
                 <n.set_var. name="value"><n.page_node.default_reply_subject/></n.set_var.>
                 <n.set_var. name="value1"><n.page_node.default_reply_subject/></n.set_var.>
                 <n.if.not.is_empty.var name="value">
                       <then>
                     <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬n¬">
                         <then>
                           <n.set_var. name="value"><n.jsm_limpamark_new texto="[n.var name='value1'/]" /></n.set_var.>
                         </then>
                     </n.if.contains_substring>
                     <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬¢¬">
                            <then>
                                <n.set_var. name="value"><n.jsm_limpamark_chkfull texto="[n.var name='value1'/]" /></n.set_var.>
                            </then>
                      </n.if.contains_substring>
                       <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬.¬">
                           <then>
                               <n.set_var. name="value"><n.jsm_limpamark_chknormal texto="[n.var name='value1'/]" /></n.set_var.>
                          </then>
                       </n.if.contains_substring>
                       <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬h¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkhelp texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬e¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkexclama texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬a¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkadm texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                      
                               <n.subject_field.set_value value="[n.var name='value'/]" />
                      </then>
                      <else>
                              <n.subject_field.set_value value="[n.page_node.default_reply_subject/]" />
                     </else>
                </n.if.not.is_empty.var>
                
                
                <n.alert_field.set_value value="[n.page_node.alert_default_value/]" />
                <n.init_new_post_custom_fields/>
            </then>
            <else>
                <n.set_var. name="txtfinal"><n.subject_field.value/></n.set_var.>
                <n.if.jsm_checkboxnew_field.is_checked>
                     <then>
                         <n.set_var. name="txtfinal"><n.subject_field.value/> ¬n¬</n.set_var.>
                    </then>
                 </n.if.jsm_checkboxnew_field.is_checked>
                <n.if.jsm_checkboxfull_field.is_checked>
                     <then>
                         <n.set_var. name="txtfinal"><n.subject_field.value/> ¬¢¬</n.set_var.>
                    </then>
                 </n.if.jsm_checkboxfull_field.is_checked>
               <n.if.jsm_checkboxnormal_field.is_checked>
                     <then>
                         <n.set_var. name="txtfinal"><n.subject_field.value/> ¬.¬</n.set_var.>
                    </then>
                 </n.if.jsm_checkboxnormal_field.is_checked>
                <n.if.jsm_checkboxhelp_field.is_checked>
                     <then>
                         <n.set_var. name="txtfinal"><n.subject_field.value/> ¬h¬</n.set_var.>
                    </then>
                 </n.if.jsm_checkboxhelp_field.is_checked>
                <n.if.jsm_checkboxexclama_field.is_checked>
                     <then>
                         <n.set_var. name="txtfinal"><n.subject_field.value/> ¬e¬</n.set_var.>
                    </then>
                 </n.if.jsm_checkboxexclama_field.is_checked>
                 <n.if.visitor.is_site_admin>
                    <then>
                         <n.if.jsm_checkboxadm_field.is_checked>
                              <then>
                                  <n.set_var. name="txtfinal"><n.subject_field.value/> ¬a¬</n.set_var.>
                             </then>
                          </n.if.jsm_checkboxadm_field.is_checked>
                    </then>
                 </n.if.visitor.is_site_admin>
                
                <n.catch_exception. id="save-block">
                    <n.handle_anonymous_submit/>
                    <n.check_antispam_submit bypass="preview"/>
                    <n.check_recent_post_limit/>
                    <n.create_child_of_page_node commit="[n.not.is_preview/]">
                       <subject><n.var name='txtfinal'/></subject>
                        <message><n.message_field.value/></message>
                        <is_html><n.html_format_field.value/></is_html>
                        <type><n.type_field.value/></type>
                        <kind>post</kind>
                        <do>
                            <n.remember_new_node/>
                            <n.if.not.is_preview>
                                <then>
                                    <n.save_post/>
                                    <n.save_new_post_custom_fields/>
                                    <n.new_node.send_node_as_email/>
                                </then>
                            </n.if.not.is_preview>
                        </do>
                    </n.create_child_of_page_node>
                    <n.if.not.is_preview>
                        <then>
                            <n.new_node.save_alert_field/>
                            <n.redirect_to.new_node.url/>
                        </then>
                    </n.if.not.is_preview>
                </n.catch_exception.>
            </else>
        </n.if.not.is_submitted_form>
        <n.html>
            <head>
                <META NAME="robots" CONTENT="noindex,nofollow"/>
                <n.title.><n.page_name/></n.title.>
                <n.focus/>
                <style type="text/css">
                    .title-row {
                        padding:.6em .8em;
                        font-weight:bold;
                    }
                    div.field-title {
                        margin-top: 0;
                    }
                </style>
            </head>
            <body>
                <n.set_var. name="value"><n.page_node.subject/></n.set_var.>
                <n.set_var. name="value1"><n.page_node.subject/></n.set_var.>
                <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬n¬">
                         <then>
                           <n.set_var. name="value"><n.jsm_limpamark_new texto="[n.var name='value1'/]" /></n.set_var.>
                         </then>
                 </n.if.contains_substring>
                 <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬¢¬">
                            <then>
                                <n.set_var. name="value"><n.jsm_limpamark_chkfull texto="[n.var name='value1'/]" /></n.set_var.>
                            </then>
                  </n.if.contains_substring>    
                  <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬.¬">
                           <then>
                               <n.set_var. name="value"><n.jsm_limpamark_chknormal texto="[n.var name='value1'/]" /></n.set_var.>
                          </then>
                  </n.if.contains_substring>
 
                   <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬h¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkhelp texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬e¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkexclama texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬a¬">
              <then>
                   <n.set_var. name="value"><n.jsm_limpamark_chkadm texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                  <n.edit_header first_text="[n.page_name/]" second_text="[n.truncate. size='80'][n.var name='value'/][/n.truncate.]" />
 
 
                <n.if.is_submitted_form>
                    <then>
                        <n.if.has_exception for="save-block">
                            <then.show_new_node_error/>
                            <else>
                                <n.if.is_preview>
                                    <then.new_node.preview/>
                                </n.if.is_preview>
                            </else>
                        </n.if.has_exception>
                    </then>
                </n.if.is_submitted_form>
 
                <n.subscription_reminder/>
 
                <n.form. onsubmit="return singleSubmit(this)">
                    <n.type_field.hidden/>
                    <n.mailing_list_notice.mailing_list_etiquette/>
 
                    <n.reply_form />
 
                    <div style="margin-top:1em">
                        <n.antispam_submit_button class="toolbar action-button" value="[t]Post Message[/t]"/>
                        <input type="submit" class="toolbar action-button" name="preview" value="[t]Preview Message[/t]"/>
                        <t>or</t>
                        <a href="[n.page_node.url /]"><t>Cancel</t></a>
                    </div>
                </n.form.>
 
                <n.hide_null.bottom/>
            </body>
        </n.html>
    </n.node_page.>
</override_macro>

<override_macro name="news_title_row" requires="node">
    <div class="news-title">
        <h2 class="news-title adbayes-content">
            <n.jsm_gallery_node_link/>
        </h2>
        <n.if.is_in_subapp>
            <then>
                <t>in <t.location.italic.subapp_link_on_hover/></t>
            </then>
        </n.if.is_in_subapp>
        <n.star/>
    </div>
</override_macro>

<override_macro name="pin_column">
    <n.table_column>
        <head>
            <td class="[n.column_default_border/] pin-column nowrap" style="width:24px"></td>
        </head>
        <body>
            <n.current_node.>
                <td class="[n.column_default_border/]" style="padding-left:.2em">
                    <n.if.is_app>
                        <then>
                            <n.if.is_pinned_in_loop>
                                <then><img src="/images/forum_pin.png" width="29" height="23" title="[t]Pinned sub-forum[/t]" alt="[t]Pinned sub-forum[/t]"/></then>
                                <else><img src="/images/forum.png" width="25" height="23" title="[t]Floating sub-forum[/t]" alt="[t]Floating sub-forum[/t]"/></else>
                            </n.if.is_pinned_in_loop>
                        </then>
                        <else>
                            <n.if.contains_substring string="[n.break_up.subject/]" substring=" ¬a¬">
                                <then>
                                     &nbsp;<img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1292/justice.png" width="25" height="20" alt="Administração"/>
                                </then>
                                <else>
                                    <n.if.is_pinned_in_loop>
                                         <then><img src="/images/pin.png" width="20" height="21" alt="pin"/></then>
                                    </n.if.is_pinned_in_loop>
                               </else>
                            </n.if.contains_substring>
                        </else>
                    </n.if.is_app>
                </td>
            </n.current_node.>
        </body>
    </n.table_column>
</override_macro>

<override_macro name="post_subject" parameters="separator" requires="node">
    <n.set_var. name='parent_subject'>
        <n.if.has_parent>
            <then.parent_node.subject/>
        </n.if.has_parent>
    </n.set_var.>
    <n.if.not.ends_with text="[n.subject/]" suffix="[n.var name='parent_subject'/]">
        <then>
               <n.set_var. name="value"><n.subject/></n.set_var.>
                <n.set_var. name="value1"><n.subject/></n.set_var.>
               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬n¬">
                <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/icone_new.gif" />&nbsp;<n.jsm_limpamark_new texto="[n.var name='value1'/]" /></n.set_var.>
                </then>
           </n.if.contains_substring>
           <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬¢¬">
                <then>
                    <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/success.png" />&nbsp;<n.jsm_limpamark_chkfull texto="[n.var name='value1'/]" /></n.set_var.>
                </then>
           </n.if.contains_substring>    
           <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬.¬">
                <then>
                 <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconmark.png" />&nbsp;<n.jsm_limpamark_chknormal texto="[n.var name='value1'/]" /></n.set_var.>
                </then>
           </n.if.contains_substring>
            <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬h¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconehelp.png" />&nbsp;<n.jsm_limpamark_chkhelp texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬e¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconexclama.png" />&nbsp;<n.jsm_limpamark_chkexclama texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬a¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconadmin.png" />&nbsp;<n.jsm_limpamark_chkadm texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
 
           <span class="post-subject adbayes-content"><n.var name='value'/><n.hide_null.separator/></span>
        </then>
    </n.if.not.ends_with>
</override_macro>

<override_macro name="smart_post_link" requires="node" dot_parameter="href" parameters="text, title, class">
    <n.if.is_post>
        <then>
         <n.if.contains_substring string="[n.node_text.text/]" substring="¬">
             <then>
                   <n.set_var. name="value"><n.node_text.text/></n.set_var.>
                   <n.set_var. name="value1"><n.node_text.text/></n.set_var.>
                 <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬n¬">
                 <then>
                      <n.set_var. name="value"><n.jsm_limpamark_new texto="[n.var name='value1'/]" /></n.set_var.>
                      <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/icone_new.gif" />&nbsp;<a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.var name='value'/></a>
                     </then>
           </n.if.contains_substring>
            <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬¢¬">
                 <then>
                     <n.set_var. name="value"><n.jsm_limpamark_chkfull texto="[n.var name='value1'/]" /></n.set_var.>
                     <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/success.png" />&nbsp;<a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.var name='value'/></a>
                 </then>
           </n.if.contains_substring>    
           <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬.¬">
                 <then>
                      <n.set_var. name="value"><n.jsm_limpamark_chknormal texto="[n.var name='value1'/]" /></n.set_var.>
                     <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconmark.png" />&nbsp;<a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.var name='value'/></a>
                 </then>
           </n.if.contains_substring>
           <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬h¬">
                 <then>
                      <n.set_var. name="value"><n.jsm_limpamark_chkhelp texto="[n.var name='value1'/]" /></n.set_var.>
                     <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconehelp.png" />&nbsp;<a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.var name='value'/></a>
                 </then>
           </n.if.contains_substring>
           <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬e¬">
                 <then>
                      <n.set_var. name="value"><n.jsm_limpamark_chkexclama texto="[n.var name='value1'/]" /></n.set_var.>
                     <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconexclama.png" />&nbsp;<a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.var name='value'/></a>
                 </then>
           </n.if.contains_substring>
           <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬a¬">
                 <then>
                      <n.set_var. name="value"><n.jsm_limpamark_chkadm texto="[n.var name='value1'/]" /></n.set_var.>
                     <img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconadmin.png" />&nbsp;<a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.var name='value'/></a>
                 </then>
           </n.if.contains_substring>
                 <n.call_later value="[n.topic_node.id/]" param="markUnreadTopics"/>            
             </then>
             <else>
                 <a href="[n.node_href.href/]" title="[n.title/]" class="[n.hide_null.class/] post-link[n.topic_node.id/]" node-id="[n.id/]"><n.node_text.text/></a>
                 <n.call_later value="[n.topic_node.id/]" param="markUnreadTopics"/>  
             </else>
         </n.if.contains_substring>
             
        </then>
        <else.node_link text="[n.text/]"/>
    </n.if.is_post>
</override_macro>

<override_macro name="subcategories_column" parameters="title,width">
    <n.table_column>
        <head>
            <td class="[n.column_default_border/] subcategories-column nowrap" style="[n.width_style.width/]" colspan="2">
                <n.default. to="[t]Subcategories[/t]"><n.title/></n.default.>
            </td>
        </head>
        <body>
            <td class="[n.column_default_border/]" style="width:1em">
                <n.if.current_node.is_app>
                    <then><img src="/images/forum.png" width="25" height="23"/></then>
                    <else><img src="/images/thread.png" width="25" height="23"/></else>
                </n.if.current_node.is_app>
            </td>
            <td class="weak-color [n.column_default_border/] adbayes-content" style="width:60%">
                <div style="font-weight:bold;margin-bottom:.3em">
                    <n.current_node.jsm_gallery_node_link/>
                </div>
                <span class="weak-color node-snippet" style="font-size:90%;display:block;padding-bottom:.5em">
                    <n.if.current_node.is_app>
                        <then.current_node.node_message_as_html/>
                        <else>
                            <n.truncate. size="300">
                                <n.remove_html_tags.current_node.message.as_text/>
                            </n.truncate.>
                        </else>
                    </n.if.current_node.is_app>
                    <n.if.current_node.has_subapps>
                        <then>
                            <div class="sub-forums weak-color">
                                <b><t>Sub-Forums</t>:</b>
                                <n.current_node.subapps_list.loop.>
                                    <n.current_node.node_link class="nowrap" />&#32;
                                </n.current_node.subapps_list.loop.>
                            </div>
                        </then>
                    </n.if.current_node.has_subapps>
                </span>
            </td>
        </body>
    </n.table_column>
</override_macro>

<override_macro name="topic_header">
    <div id="topic-search-box" class="search-box float-right" style="padding:.5em 0">
        <n.page_node.search_box/>
    </div>
    <n.set_var. name="value"><n.break_up.page_node.subject/></n.set_var.>
    <n.set_var. name="value1"><n.break_up.page_node.subject/></n.set_var.>
    <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬n¬">
      <then>
         <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/icone_new.gif" />&nbsp;<n.jsm_limpamark_new texto="[n.var name='value1'/]" /></n.set_var.>
      </then>
   </n.if.contains_substring>
   <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬¢¬">
      <then>
          <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/success.png" />&nbsp;<n.jsm_limpamark_chkfull texto="[n.var name='value1'/]" /></n.set_var.>
      </then>
   </n.if.contains_substring>    
   <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬.¬">
      <then>
          <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconmark.png" />&nbsp;<n.jsm_limpamark_chknormal texto="[n.var name='value1'/]" /></n.set_var.>
      </then>
   </n.if.contains_substring>
    <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬h¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconehelp.png" />&nbsp;<n.jsm_limpamark_chkhelp texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
                <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬e¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconexclama.png" />&nbsp;<n.jsm_limpamark_chkexclama texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
               <n.if.contains_substring string="[n.var name='value1'/]" substring=" ¬a¬">
              <then>
                   <n.set_var. name="value"><img src="http://astronomia-e-astrofotos.1069742.n5.nabble.com/file/n1293/iconadmin.png" />&nbsp;<n.jsm_limpamark_chkadm texto="[n.var name='value'/]" /></n.set_var.>
              </then>
              </n.if.contains_substring>
 
    <h1 id="post-title" class="adbayes-content" style="margin:0.25em 0 .8em">
        <n.var name='value'/>
    </h1>  
</override_macro>
Observatório de Astronomia de Vilatur - W. Herschel
Saquarema - RJ - Brasil
http://www.astronomia.pousadavilatur.com.br
Reply | Threaded
Open this post in threaded view
|

Re: Option to solve topics & Give XP

Mencey Melgar
Great work here jsmoraes! I hope the nabble team will add this feature to their services :)
:) Helper