The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Button adding prefixed didn't work on my forum

View previous topic View next topic Go down

Solved Button adding prefixed didn't work on my forum

Post by Yuushishio on March 15th 2016, 7:44 am

I followed this TUT: http://help.forumotion.com/t134270-buttons-to-add-prefixes-in-topic-titles#903824

code add in my forum:
Css:
Code:
#button_label {
color: #09c;
background-color: #fff;
border: 1px solid #464646;
border-radius: 2px;
}

JS:
Code:
jQuery(document).ready(function() {
jQuery('#modif_topic_title').after('<input type="button" value="Tag Thảo Luận" onclick="set_solved(this.form.elements[\'modif_topic_title\'],\'[Thảo Luận]\')" style="display: inline;" id="button_label">');
});

But nothing was added in my forum.
---------------

Edit: I just realized that it did affect in my forum but only work when I edit the topic.
When I create a new topic, there's no option appear. Is this the default of this TUT? If so, can I have them in the create a new topic.


---------------

my forum: http://www.1000sunny.net/
ver phpbb3


Last edited by Yuushishio on March 16th 2016, 12:32 am; edited 1 time in total

Yuushishio
Forumember

Posts : 116
Reputation : 3
Language : English

http://sharetheworld.forumvi.com

Back to top Go down

Solved Re: Button adding prefixed didn't work on my forum

Post by Sir Chivas™ on March 15th 2016, 3:10 pm

Hi,

As far as I know and comprehend, the code is only written for when there's an edit to the thread. Due to the fact that: "Modify topic title" only appears when clicking edit. For the moment, I wouldn't be able to provide you with a code that will meet your standards.

Forgive me,
Sir Chivas.



Attention!
- Please provide your forum URL at all times.
- When the issue is solved, please mark it as solved.



Sir Chivas™
Support Moderator
Support Moderator

Male Posts : 6756
Reputation : 428
Language : English, Spanish, and French
Location : || CSS || HTML || Graphics Designs || Support ||

Back to top Go down

Solved Re: Button adding prefixed didn't work on my forum

Post by SLGray on March 15th 2016, 9:54 pm

If you want one when you create a topic, you can use the topic icon option.

AP > Display > Colors & Pictures > Pics Management
Advanced Mode
Topic Icons Tab


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35622
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Button adding prefixed didn't work on my forum

Post by Yuushishio on March 16th 2016, 12:32 am

Thank you. I figured out how to solve it Very Happy by myself through editing the template.
Post & Private Messages/Posting_body.
I just changed the part
Code:
<!-- BEGIN switch_subject -->
            <dl>
                <dt><label>{L_SUBJECT}</label></dt>
              <dd>
                    <input class="inputbox medium" type="text" name="subject" value="{SUBJECT}" maxlength="{TOPIC_TITLE_MAXLENGTH}" title="{TOPIC_TITLE_LENGTH_EXPLAIN}" onkeypress="if (event.keyCode==13){return false}" />

to this
Code:
            <!-- BEGIN switch_subject -->
            <dl>
                <dt><label for="SUBJECT">{L_SUBJECT}</label></dt>
              <dd>
                    <input class="inputbox medium" type="text" name="subject" value="{SUBJECT}" maxlength="{TOPIC_TITLE_MAXLENGTH}" title="{TOPIC_TITLE_LENGTH_EXPLAIN}" onkeypress="if (event.keyCode==13){return false}" />

                  <dt><label for="modif_topic_title">{L_TOPIC_TITLE_MODIFY}</label></dt>
                <dd>
                    <input style="display:none" type="text" class="inputbox medium" name="modif_topic_title" id="modif_topic_title" value="{MODIF_TOPIC_TITLE}" maxlength="{TOPIC_DESCRIPTION_MAXLENGTH}" onkeypress="if (event.keyCode==13){return false}" />

Then change the JS to
Code:
jQuery(document).ready(function() {

jQuery('#modif_topic_title').after('<input type="button" value="label" onclick="set_solved(this.form.elements[\'subject\'],\'[content]\'); set_solved(this.form.elements[\'modif_topic_title\'],\'[content]\')" style="display: inline;" id="button_label">');
});

Now I can add tags and thing by just create a new topic Very Happy
This works for phpbb3 (I've not tried them in other version)
Result in my forum (I added a lot of tag, they work perfectly as the original 'only modify' version)


You guys can try it too XD!

Yuushishio
Forumember

Posts : 116
Reputation : 3
Language : English

http://sharetheworld.forumvi.com

Back to top Go down

Solved Re: Button adding prefixed didn't work on my forum

Post by SLGray on March 16th 2016, 12:33 am

Thanks for posting the solution.

Topic solved and archived


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35622
Reputation : 2372
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum