If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Messages posted by: medusahead
Forum Index » Profile for medusahead » Messages posted by medusahead
Author Message
Hello,

I've been struggling with the same thing & I have a solution. It may not be the best but it is easy & it works fine as far as I can tell.

create a name anchor at each poll, just make it part of your workflow of putting polls on the page. name each of these with a number corresponding with the id# of the poll.

so if it is poll id 7, then your name anchor will look like


Then in the head of your page insert:


What this does is grabs the $poll_ident variable, which has the same number as $poll_id except it is processed GET, so the variable is available to be plugged in after the #...when someone votes, the page refreshes immediately, so there is not much lag to speak of.

Hope that helps
I got a little advice at phpfreaks about using poll_id to anchor via redirect...



But i'm starting to think that a redirect is unnecessary since the page with results loads anyway...

If I just find what part of the codes loads/reloads the page with the results, then maybe I can add anchor info to that...

I could really use some help...really any advice would be useful...

Thanks
hello,

Well, I'm hovering all around this problem & could use any advice anyone might have.

I can make links to the anchors in the template, but it needs to be automatic after a vote to get people back to the appropriate results, rather than the top of the page.
If I use a:

in the template, it doesn't make it to the final HTML page. I suspect that it is getting lost when the php processes. This tells me I need to make the redirect to the anchor via php...but where is it? I've scoured all the files, but am confused about what gets me back to my HTML after a vote.

Also, I considered stuffing the anchor (that has the same name as the poll-id) into a:

,but again, where? (if something like that would even work)

seriously, if anyone has any ideas, that would be awesome!
Thanks
hello, one other thing.

I have several polls on a pages and when someone votes, the page goes back to the top & they have to scroll back down to see their results. Not a huge deal, but kind of annoying.

I searched the forum for anchoring tips, but had no luck.

Here's my idea, but I'm not sure how to make it work (if it will work):

For example, I make an <a name="7"> on my html page at the location of the poll in question, then I want to <a href="#$poll_id"> (or something like that) in the code/template to return the current poll_id number (in this case "7") back into the <a href> to the redirect script.

I feel like this might anchor to whatever poll is currently giving results...but I'm not sure how to implement it into the redirect...any hints?

Thanks
I worked around it by removing the $pollvars [title] from the template and just used a table on the actual html page & made the different titles manually.
Hello, This is my first post here, nice to meet you.

I just have one small problem I can't seem to figure out with AP.
I would like to have multiple (many) polls on a page, but each one needs it's own title.

If I change the title in the general settings, it changes it for all the polls on the page. Also, I can't hard-code it into the template for the same reason.

Does anyone have an idea how to accomplish this? It would appear that Demo One is an example of it, but no instructs how it got there.

Thanks
 
Forum Index » Profile for medusahead » Messages posted by medusahead
Go to:   
Based on the open source JForum