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.

Reply button

View previous topic View next topic Go down

Solved Reply button

Post by Wealh on November 7th 2015, 3:55 am

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
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Wealh on November 8th 2015, 7:48 am

Bump

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 on November 8th 2015, 5:30 pm

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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Reply button

Post by Wealh on November 9th 2015, 4:47 am

@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
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur on November 9th 2015, 10:58 am

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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Reply button

Post by Wealh on November 9th 2015, 6:42 pm

@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
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur on November 9th 2015, 7:02 pm

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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Reply button

Post by Wealh on November 9th 2015, 8:31 pm

@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
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur on November 9th 2015, 8:41 pm

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
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Reply button

Post by Wealh on November 9th 2015, 8:44 pm

@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
Forumember

Posts : 69
Reputation : 6
Language : English

http://boredom.iftopic.com/

Back to top Go down

Solved Re: Reply button

Post by Ange Tuteur on November 9th 2015, 9:04 pm

You're welcome ^^

Topic archived

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

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.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