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.

[Invision] Replace image buttons with <buttons> part II

View previous topic View next topic Go down

Solved [Invision] Replace image buttons with <buttons> part II

Post by Klemen on August 26th 2015, 2:11 am

I made a thread a few days ago asking how to replace image buttons for actual html <button></buttons> in order to style them with css.

I was able to do that with buttons 'New Topic' and 'Add reply' through editing the templates, but I'm unable to customize the buttons found inside the post, i.e. 'Edit', 'Delete' and 'Quote'.

The problem is that there are no direct links for these buttons in the templates. There are only images and then those images contain the links that I need, but I don't know where to find them.

Here's the part from the viewtopic_body template that produces the images:

Code:
<ul class="posting-icons">
    <li>{postrow.displayed.THANK_IMG}</li>
    <li>{postrow.displayed.DELETE_IMG}</li>
    <li>{postrow.displayed.EDIT_IMG}</li>
    <li>{postrow.displayed.QUOTE_IMG}</li>
</ul>

and here's how I want to make into <button></buttons> (with missing links):

Code:
<ul class="posting-icons">
    <li><button type="button" onclick="location.href='{Thank_link}';">Thank</button></li>
    <li><button type="button" onclick="location.href='{Delete_link}';">Delete</button></li>
    <li><button type="button" onclick="location.href='{Edit_link}';">Edit</button></li>
    <li><button type="button" onclick="location.href='{Quote_link}';">Quote</button></li>
</ul>

Thanks in advance,
Klemen



Last edited by Klemen on August 26th 2015, 4:14 pm; edited 1 time in total

Klemen
Forumember

Male Posts : 292
Reputation : 32
Language : English, German, Slovene

http://www.bannedbrotherhood.com

Back to top Go down

Solved Re: [Invision] Replace image buttons with <buttons> part II

Post by Klemen on August 26th 2015, 4:14 pm

I solved this using JS:

Code:
jQuery(document).ready(function() {
$('.i_icon_quote').replaceWith('<button type="button">Quote</button>');
$('.i_icon_edit').replaceWith('<button type="button">Edit</button>');
.
.
.
});

Probably not an ideal solution, but hey, it works!


Solved.

Klemen
Forumember

Male Posts : 292
Reputation : 32
Language : English, German, Slovene

http://www.bannedbrotherhood.com

Back to top Go down

Solved Re: [Invision] Replace image buttons with <buttons> part II

Post by APE on August 26th 2015, 4:51 pm

Thank you for giving us the answer to your problem.
Topic solved and archived






APE
Manager
Manager

Male Posts : 8341
Reputation : 719
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

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