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.

Questions about reputation links

2 posters

Go down

In progress Questions about reputation links

Post by Guest November 28th 2022, 3:35 pm

Forum version: AwesomeBB.

Default voting system looks like this:

Code:
<!-- BEGIN switch_vote -->
                              <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}" class="vote-up">
                                 <i class="material-icons">add_circle_outline</i>
                              </a>
                              <!-- END switch_vote -->

                              <!-- BEGIN switch_vote -->
                              <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}" class="vote-down">
                                 <i class="material-icons">remove_circle_outline</i>
                              </a>
                              <!-- END switch_vote -->

1. Now, I take this link they have, put it somewhere else, where I am making custome voting system, but once page loads, that links doesn't have any href, while the original one does. How is that possible?

2. How can I get only a number of votes given?


Last edited by System32 on November 29th 2022, 11:47 am; edited 1 time in total
avatar
Guest
Guest


Back to top Go down

In progress Re: Questions about reputation links

Post by Razor12345 November 29th 2022, 10:21 am

Good afternoon!

If you take this snippet of code and paste it somewhere other than the viewtopic_body template, the variables become inactive.

The only way out is to write your own voting code or search in the internet for ready-made modules


Questions about reputation links Screen51
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1450
Reputation : 262
Language : Ukr, Rus, Eng
Location : Ukraine

Back to top Go down

In progress Re: Questions about reputation links

Post by Guest November 29th 2022, 10:55 am

I paste it inside the same template. Didn't put it out. That's the reason I find it confusing.
And what about getting the number of votes, without the text? Only number?
avatar
Guest
Guest


Back to top Go down

In progress Re: Questions about reputation links

Post by Razor12345 November 29th 2022, 11:07 am

Let's put it another way - display what you want schematically or with screenshots.

Where do you want to see the vote?

And what about getting the number of votes, without the text? Only number?

I don't understand what you want.

Let you tell us what you want in full, not like the guest sections - start with one, end with another.


Questions about reputation links Screen51
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1450
Reputation : 262
Language : Ukr, Rus, Eng
Location : Ukraine

Back to top Go down

In progress Re: Questions about reputation links

Post by Guest November 29th 2022, 11:32 am

Questions about reputation links Scree112

Vote system. Simple, working. Placed inside footer, cool. Right click on it shows me a link with actual href value.
I copy excatly the same html, put it inside the post body, align where i want, style and that's all. No addition to code, just use default. What happend? Link doesn't have value for href attribute. Same goes for vote up and vote down.

Number I am looking for?
Questions about reputation links Scree113
Without the text, of course.

So, how is it possible that same piece of code, put inside the same template, doesn't work for one?
avatar
Guest
Guest


Back to top Go down

In progress Re: Questions about reputation links

Post by Ape November 29th 2022, 11:42 am

Oh I see what your talking about now it's not a voting system your talking about its the reputation system.
They are not the same thing. Wink


Questions about reputation links Left1212Questions about reputation links Center11Questions about reputation links Right112
Questions about reputation links Ape_b110
Questions about reputation links Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19110
Reputation : 1991
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

In progress Re: Questions about reputation links

Post by Guest November 29th 2022, 11:47 am

Oh my, well yeah. But the code says vote this, vote that, vote classes. Questions about reputation links 1f602
So, now the truth have been told, anyone care to share some info? Very Happy
avatar
Guest
Guest


Back to top Go down

In progress Re: Questions about reputation links

Post by Ape November 29th 2022, 11:52 am

I am a little lost to why it would not work as i have seen others move them to some other place Think @pedxz is always good at this sort of thing and @skouliki


Questions about reputation links Left1212Questions about reputation links Center11Questions about reputation links Right112
Questions about reputation links Ape_b110
Questions about reputation links Ape1010
Ape
Ape
Administrator
Administrator

Male Posts : 19110
Reputation : 1991
Language : fluent in dork / mumbojumbo & English haha

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

Back to top Go down

In progress Re: Questions about reputation links

Post by Guest November 29th 2022, 11:55 am

Just under the
Code:
<div class="post-content">
I added this code:
Code:
<div id="personal-vote">                                     
                                    <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}" class="vote-up"><i class="material-icons">keyboard_arrow_up</i></a>
                                    <h4>0</h4>
                                    <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}" class="vote-down"><i class="material-icons">keyboard_arrow_downp</i></a>
                                 
                                  </div>

No need to post style. We talk about funcionality. This appears well but link href value, do not.
Questions about reputation links Scree114
avatar
Guest
Guest


Back to top Go down

In progress Re: Questions about reputation links

Post by Razor12345 November 29th 2022, 12:35 pm

About the buttons:

Use this code

Code:
<!-- BEGIN switch_vote_active -->
                           <div class="vote">
                              <!-- BEGIN switch_vote -->
                              <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}" class="vote-up">
                                 <i class="material-icons">add_circle_outline</i>
                              </a>
                              <!-- END switch_vote -->

                              <!-- BEGIN switch_vote -->
                              <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}" class="vote-down">
                                 <i class="material-icons">remove_circle_outline</i>
                              </a>
                              <!-- END switch_vote -->

                           </div>
                           <!-- END switch_vote_active -->

About the second question, I think about it. There are complications here.


Questions about reputation links Screen51
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1450
Reputation : 262
Language : Ukr, Rus, Eng
Location : Ukraine

Back to top Go down

In progress Re: Questions about reputation links

Post by Guest November 29th 2022, 12:40 pm

Yes, I am using that code but I added something in it (not touching href). Only thing I didn't use is name of div's class "vote". I put "personal-vote". Can that affect the outcome?
avatar
Guest
Guest


Back to top Go down

In progress Re: Questions about reputation links

Post by Razor12345 November 29th 2022, 12:57 pm

I don't know why, but the template doesn't like the ID.

I suggest you use the class:

Code:
<div class="personal_vote">
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1450
Reputation : 262
Language : Ukr, Rus, Eng
Location : Ukraine

Back to top Go down

In progress Re: Questions about reputation links

Post by Guest November 29th 2022, 1:09 pm

I changed from ID to class, same result, no value of href. Neutral
avatar
Guest
Guest


Back to top Go down

In progress Re: Questions about reputation links

Post by Razor12345 November 29th 2022, 1:15 pm

Code:
<div class="personal_vote">
                              <!-- BEGIN switch_vote -->
                              <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_PLUS}" class="vote-up">
                                 <i class="material-icons">keyboard_arrow_up</i>
                              </a>
                              <!-- END switch_vote -->
<h4>0</h4>
                              <!-- BEGIN switch_vote -->
                              <a href="{postrow.displayed.switch_vote_active.switch_vote.U_VOTE_MINUS}" class="vote-down">
                                 <i class="material-icons">keyboard_arrow_downp</i>
                              </a>
                              <!-- END switch_vote -->

                           </div>

Questions about reputation links Ouo60


Questions about reputation links Screen51
Razor12345
Razor12345
Support Moderator
Support Moderator

Male Posts : 1450
Reputation : 262
Language : Ukr, Rus, Eng
Location : Ukraine

Back to top Go down

In progress Re: Questions about reputation links

Post by Guest November 29th 2022, 1:29 pm

Very odd because, when I use your code, links are completely gone. Only h4 is shown Shocked
Here is the link (I put my old code): https://testaca.forumotion.me/t2-solvednbeka-nova-tema
I am going to make rep system same as XenForo has. Just no idea why links don't show up..
avatar
Guest
Guest


Back to top Go down

Back to top

- Similar topics

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