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.

auto solved button code

View previous topic View next topic Go down

auto solved button code

Post by bodahassan on August 3rd 2016, 12:46 pm

Technical Details


Forum version : #phpBB2
Position : Founder
Concerned browser(s) : Mozilla Firefox, Google Chrome
Screenshot of problem : http://i35.servimg.com/u/f35/13/76/93/58/3223110.png
Who the problem concerns : All members
Forum link : http://www.koutstore.com

Description of problem

I have a problem in auto solved button
link of the code topic: http://help.forumotion.com/t144451-make-auto-solved
The problem is that the button is shows just for admins
I want to show the buttons for the members
js code

Code:
    $(function() {
              window.$fa_solved = {
             
                icon : {
                  id : 8
                },
             
        lang : {
          mark : '<i class="fa"></i> Mark Solved',
          mark_title : 'Marking your topic with the Solved icon will let staff know your problem has been resolved.',
          mark_title_mod : 'Mark this topic Solved',
          marking : '<i class="fa fa-spin"></i> Marking...',
          marked : '<i class="fa"></i> Solved !'
        },
             
                post_id : $('tr.post')[0].id.slice(1),
             
                encode : function(string) {
                  return encodeURIComponent(escape(string).replace(/%u[A-F0-9]{4}/g, function(match) {
                    return '&#' + parseInt(match.substr(2), 16) + ';';
                  })).replace(/%25/g, '%');
                }
             
              };
           
              var main = document.getElementById('solve-button'), post = $('tr.post', main)[0], author = $('.poster-profile a[href^="/u"]', post).text(), mod = $('.i_icon_ip', post)[0], button = document.createElement('A');
           
              if (!mod && author != _userdata.username) return;
           
              button.innerHTML = $fa_solved.lang.mark;
              button.title = 'اضغط هنا';
              button.className = 'soldbtn';
              button.href = '#';
           
              button.onclick = function() {
                var t = this;
                t.innerHTML = $fa_solved.lang.marking;
                t.removeAttribute('title');
                t.onclick = function() { return false };
             
                $.get('/post?p=' + $fa_solved.post_id + '&mode=editpost', function(d) {
                  var auth = $('input[name="auth[]"]', d);
                  $.post('/post', 'subject=' + $fa_solved.encode($('input[name="subject"]', d)[0].value) + '&message=' + $fa_solved.encode($('#text_editor_textarea', d)[0].value) + '&p=' + $fa_solved.post_id + '&post_icon=' + $fa_solved.icon.id + '&mode=editpost&auth[]=' + auth[0].value + '&auth[]=' + auth[1].value + '&post=1', function() {
                    t.innerHTML = $fa_solved.lang.marked;
                    t.className += ' marked';
                  });
                });
             
                return false;
              };
           
              main.insertBefore(button, main.firstChild);
              'par ange tuteur';
            });

Could you please find a solution ??!

Sorry if my English is bad For you
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 5:23 am

؟؟؟؟؟؟؟؟؟!!
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by SLGray on August 4th 2016, 8:26 am

AP > Display > Colors & Pictures > Pics Management
Advanced Mode
Topic Icons Tab
What is the solved topic icon set to: administrators, moderators, or all?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 39048
Reputation : 2624
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 9:10 am

it set to all
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by SLGray on August 4th 2016, 9:14 am

Could you please send me a test account?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 39048
Reputation : 2624
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 9:27 am

@SLGray done ...
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by SLGray on August 4th 2016, 9:32 am

Ok. You will need to post a link to where I can start a topic because I do not understand Arabic.


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

avatar
SLGray
Administrator
Administrator

Male Posts : 39048
Reputation : 2624
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 9:38 am

there's no problem,

here you can add new topic

http://www.koutstore.com/post?f=46&mode=newtopic
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 9:51 am

Note : This code shows for members
http://help.forumotion.com/t144451-make-auto-solved#987602

But i dont want him because its not good and the other code better than him

unfortunately I do not have experience in Javascript language to make edit in code
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by SLGray on August 4th 2016, 9:53 am

Wait a minute! Now you are saying something completely different from your first post. Do you want only administrators to see and use it?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 39048
Reputation : 2624
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 10:05 am

Do you want only administrators to see and use it

no i want administrators & member to use this button But code that I have only shows for the administrators only
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by SLGray on August 4th 2016, 10:07 am

Did you read the part that said it was created for #phpBB3 ?


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

avatar
SLGray
Administrator
Administrator

Male Posts : 39048
Reputation : 2624
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Re: auto solved button code

Post by SLGray on August 4th 2016, 10:10 am

I do not know if you know or not, but we have an official Arabic support forum: http://help.ahlamontada.com/ .


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

avatar
SLGray
Administrator
Administrator

Male Posts : 39048
Reputation : 2624
Language : English
Location : United States

https://fmthemes.forumotion.com/

Back to top Go down

Re: auto solved button code

Post by shakib al hasan on August 4th 2016, 10:19 am

Make sure to replace the 3 in id : 3 with the ID of your solved icon. Also, this script was originally meant for phpbb3, so if there are any problems let me know.

@SlGray, above words are written by Ange. But my question is that where I can find id of solved icon please?
avatar
shakib al hasan
Forumember

Male Posts : 62
Reputation : 3
Language : english

http://avacs.sforum.biz

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 10:32 am

@SLGray wrote:Did you read the part that said it was created for #phpBB3 ?

code works very well for phpbb2 Without any problems
The problem now is I want anyone make edit to js code for the button to shows for members
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 10:39 am

@SLGray wrote:I do not know if you know or not, but we have an official Arabic support forum: http://help.ahlamontada.com/ .

I know, but Arab support forum is weak
And I'm not getting useful answers
avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by bodahassan on August 4th 2016, 10:57 am

@shakib al hasan wrote:Make sure to replace the 3 in id : 3 with the ID of your solved icon. Also, this script was originally meant for phpbb3, so if there are any problems let me know.

@SlGray, above words are written by Ange. But my question is that where I can find id of solved icon please?


you can find id of icon by inspect element

avatar
bodahassan
Forumember

Posts : 35
Reputation : 1
Language : arabic

http://www.koutstore.com

Back to top Go down

Re: auto solved button code

Post by Nemo on August 4th 2016, 11:03 am

@bodahassan wrote:
@SLGray wrote:Did you read the part that said it was created for #phpBB3 ?

code works very well for phpbb2 Without any problems
The problem now is I want anyone make edit to js code for the button to shows for members

@bodahassan wrote:
@SLGray wrote:I do not know if you know or not, but we have an official Arabic support forum: http://help.ahlamontada.com/ .

I know, but Arab support forum is weak
And I'm not getting useful answers

@bodahassan wrote:
@shakib al hasan wrote:Make sure to replace the 3 in id : 3 with the ID of your solved icon. Also, this script was originally meant for phpbb3, so if there are any problems let me know.

@SlGray, above words are written by Ange. But my question is that where I can find id of solved icon please?


you can find id of icon by inspect element


Today at 11:32
Today at 11:39
Today at 11:57


Please don't double post. Your posts need to be separated by 24 hours before bumping. Please use the edit button, instead!
Please read our forum rules: ESF General Rules
avatar
Nemo
Support Moderator
Support Moderator

Male Posts : 1172
Reputation : 118
Language : Greek, English, French

http://www.helpgr.forumgreek.com

Back to top Go down

Re: auto solved button code

Post by shakib al hasan on August 4th 2016, 11:48 am

Hello @bodahassan

Can you find id of this icon
avatar
shakib al hasan
Forumember

Male Posts : 62
Reputation : 3
Language : english

http://avacs.sforum.biz

Back to top Go down

Re: auto solved button code

Post by Nemo on August 4th 2016, 1:29 pm

@shakib al hasan wrote:Make sure to replace the 3 in id : 3 with the ID of your solved icon. Also, this script was originally meant for phpbb3, so if there are any problems let me know.

@SlGray, above words are written by Ange. But my question is that where I can find id of solved icon please?

@shakib al hasan wrote:Hello @bodahassan

Can you find id of this icon

Hello,

Please create a new thread for your own questions. Read our General Rules.

Hello
avatar
Nemo
Support Moderator
Support Moderator

Male Posts : 1172
Reputation : 118
Language : Greek, English, French

http://www.helpgr.forumgreek.com

Back to top Go down

Re: auto solved button code

Post by shakib al hasan on August 4th 2016, 2:01 pm

Ok @Nemo I created thread. You can have a look over it here http://help.forumotion.com/t147974-issue-about-id-of-icon#1021651
avatar
shakib al hasan
Forumember

Male Posts : 62
Reputation : 3
Language : english

http://avacs.sforum.biz

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