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.

Reply button

2 posters

Go down

Solved Reply button

Post by Wealh Sat 7 Nov 2015 - 3:55

Can I add another reply button over my quick reply box? Another, I don't want to move the one I have now. I want to add a big CLICK HERE TO REPLY at the bottom, anyone?
Wealh
Wealh
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Wealh Sun 8 Nov 2015 - 7:48

Bump
Wealh
Wealh
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur Sun 8 Nov 2015 - 17:30

Hi @Wealh,

Yes, it should be possible. Go to Modules > JavaScript codes management and create a new script with the following settings.

Placement : In all the pages
Code:
$(function() {
  var quick = document.anchors.quickreply,
      container;

  if (quick) {
    container = document.createElement('DIV');
    container.innerHTML = '<a href="/post?t=' + window.location.href.replace(/.*?\/t(\d+).*/, '$1') + '&mode=reply">CLICK HERE TO REPLY</a>';
    container.id = 'topic_reply';

    quick.parentNode.insertBefore(container, quick);
  }
});

Then, you can style the texts with this CSS :
Code:
#topic_reply {
  text-align:center;
  font-size:16px;
  font-weight:bold;
}

For other stylistic changes, you may need to select the anchor instead. Like this :
Code:
#topic_reply a
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Reply button

Post by Wealh Mon 9 Nov 2015 - 4:47

Ange Tuteur wrote:Hi @Wealh,

Yes, it should be possible. Go to Modules > JavaScript codes management and create a new script with the following settings.

Placement : In all the pages
Code:
$(function() {
  var quick = document.anchors.quickreply,
      container;

  if (quick) {
    container = document.createElement('DIV');
    container.innerHTML = '<a href="/post?t=' + window.location.href.replace(/.*?\/t(\d+).*/, '$1') + '&mode=reply">CLICK HERE TO REPLY</a>';
    container.id = 'topic_reply';

    quick.parentNode.insertBefore(container, quick);
  }
});

Then, you can style the texts with this CSS :
Code:
#topic_reply {
  text-align:center;
  font-size:16px;
  font-weight:bold;
}

For other stylistic changes, you may need to select the anchor instead. Like this :
Code:
#topic_reply a

Thanks! I have another problem: it doesn't appear for the guests. I want only guests to see it.
Wealh
Wealh
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur Mon 9 Nov 2015 - 10:58

Oh, we'll need to replace
Code:
document.anchors.quickreply
since it doesn't show for guests. Do you have a link to the page that I can look at ?
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Reply button

Post by Wealh Mon 9 Nov 2015 - 18:42

Ange Tuteur wrote:Oh, we'll need to replace
Code:
document.anchors.quickreply
since it doesn't show for guests. Do you have a link to the page that I can look at ?

What page?
Wealh
Wealh
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur Mon 9 Nov 2015 - 19:02

A link to a topic on your forum. I don't know the forum version I'm working with, so I'm not sure what I'll need to modify in the code now.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Reply button

Post by Wealh Mon 9 Nov 2015 - 20:31

Ange Tuteur wrote:A link to a topic on your forum. I don't know the forum version I'm working with, so I'm not sure what I'll need to modify in the code now.

http://boredom.iftopic.com/t3-suicide-mouse
Wealh
Wealh
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur Mon 9 Nov 2015 - 20:41

Try this :
Code:
$(function() {
  var quick = document.getElementById('pun-info'),
      container;
 
  if (quick && !_userdata.user_level) {
    container = document.createElement('DIV');
    container.innerHTML = '<a href="/post?t=' + window.location.href.replace(/.*?\/t(\d+).*/, '$1') + '&mode=reply">CLICK HERE TO REPLY</a>';
    container.id = 'topic_reply';
 
    quick.parentNode.insertBefore(container, quick.previousSibling);
  }
});

It should make it display for guests only.
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Solved Re: Reply button

Post by Wealh Mon 9 Nov 2015 - 20:44

Ange Tuteur wrote:Try this :
Code:
$(function() {
  var quick = document.getElementById('pun-info'),
      container;
 
  if (quick && !_userdata.user_level) {
    container = document.createElement('DIV');
    container.innerHTML = '<a href="/post?t=' + window.location.href.replace(/.*?\/t(\d+).*/, '$1') + '&mode=reply">CLICK HERE TO REPLY</a>';
    container.id = 'topic_reply';
 
    quick.parentNode.insertBefore(container, quick.previousSibling);
  }
});

It should make it display for guests only.

Awesome, thanks!
Wealh
Wealh
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur Mon 9 Nov 2015 - 21:04

You're welcome ^^

Topic archived

If any problems feel free to open a new topic. Have a good day. Smile
Ange Tuteur
Ange Tuteur
Forumaster

Male Posts : 13207
Reputation : 3000
Language : English & 日本語
Location : Pennsylvania

https://fmdesign.forumotion.com

Back to top Go down

Back to top

- Similar topics

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