The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Button adding prefixed didn't work on my forum

3 posters

Go down

Solved Button adding prefixed didn't work on my forum

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

I followed this TUT: https://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
avatar
Yuushishio
Forumember

Posts : 117
Reputation : 4
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™ 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.
Sir Chivas™
Sir Chivas™
Helper
Helper

Male Posts : 6980
Reputation : 457
Language : EN, FR, ES
Location : || CSS || HTML || Graphics Designs || Support ||

https://aforums.org

Back to top Go down

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

Post by SLGray 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


Button adding prefixed didn't work on my forum Slgray10

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

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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

Post by Yuushishio 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)
Button adding prefixed didn't work on my forum New_ta10

You guys can try it too XD!
avatar
Yuushishio
Forumember

Posts : 117
Reputation : 4
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 March 16th 2016, 12:33 am

Thanks for posting the solution.

Topic solved and archived


Button adding prefixed didn't work on my forum Slgray10

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

Male Posts : 51554
Reputation : 3524
Language : English
Location : United States

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

Back to top

- Similar topics

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