Wordpress Themes - WP Forum at BFA
Click Here To DONATE! Support the theme development, get more attention and additional benefits based on your donation level. Your forum name will be highlighted.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Center area post/pages » Comments, trackbacks & pings »

Problem with Comment Form Anchor Link


Build custom WP THEMES, without
coding.
Click here for THEMEFRAME

From the author of Atahualpa, the #1 most
downloaded (700,000+) theme @ wordpress.org
  #1  
Old Jan 7, 2010, 11:31 PM
adum's Avatar
adum
 
85 posts · Jun 2009
Problem with Comment Form Anchor Link

I am trying to insert this link into my post footer to jump to the comments form, but the link gets changed once I load it on my site...

<a href="#commentform">Skip to comments form</a>

essentially gets changed to:

<a href="\commentform">Skip to comments form</a>

In the link on the page, the # gets changed to a \. What can I do to fix this? Thanks.
  #2  
Old Jan 8, 2010, 02:19 PM
juggledad's Avatar
juggledad
 
21,970 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
what version of Atahualpa and WP?
What is the URL?
Are you using any plugins for comments?
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support
  #3  
Old Feb 20, 2010, 04:54 PM
adum's Avatar
adum
 
85 posts · Jun 2009
I never figured out a solution to this problem and ended up just using a workaround, but now I can't get around the issue.

I realized the problem is that in the "Post/Page Info Items", "#" is used to escape certain letters, and thus gets converted to "\" in the URL.

I can use anchor links with # in the center column, and they are fine, it's just fact that I am trying to use them within the Post/Page Info Options of ATO. (I turned all plug-ins off btw, so this has got to be Atahualpa.)

Any way to get around this? I am extremely suprised that this was never caught before.

I am using 3.4.5 and WP 2.9.2. My site is http://www.adamcapriola.com
EDIT: I switched my Disqus plugin back on which alleviates the error to an extent.

You can see in the "Leave a Comment" link it looks like this: "http://www.adamcapriola.com/\dsq-new-post" when it should be "http://www.adamcapriola.com/#dsq-new-post"

Thanks in advance JD/Flynn!

-Adam

Last edited by adum; Feb 21, 2010 at 11:21 AM.
  #4  
Old Feb 20, 2010, 06:04 PM
adum's Avatar
adum
 
85 posts · Jun 2009
Alright well I tried looking into the problem a little more, seems like a pretty deep issue.

I tried using the HTML character entity for "#" which is "&#threefive;" (couldn't type 35 here because it got converted) in the URL, but all #'s are converted to \ so it doesn't work. # doesn't have a HTML name entity either like &nbsp; which would work.

Something in the functions has be changed I think.

EDIT: Guessing the change has to be made in bfa_ata_admin.php or functions.php. I am just not familiar enough with how to fix this thing myself.

Last edited by adum; Feb 20, 2010 at 10:37 PM.
  #5  
Old Feb 21, 2010, 12:34 PM
juggledad's Avatar
juggledad
 
21,970 posts · Mar 2009
OSX 10.8.5 WP 3.8.x Atahualpa 3.7.x Safari 6.x Firefox 25 XP
Ok, this is messy but fixable.

The problem here is that the '#' is used as the php DATE escape character in the Atahualpa options. Because the php DATE() function has so many options and each needs to be escaped, so when the footer (or kicker or title) is being displayed, all occurrences of '#' are changed to '\' leading to this problem. But take heart, there is a way to make it work.

change the last line of bfa_postinfo.php from
HTML Code:
?>
to
HTML Code:
function getH() {
	global $bfa_ata, $post;
	return('#');
	}
?>
next change your post footer from
HTML Code:
<a href="#commentform">Skip to comments form</a>
to
HTML Code:
<?php echo '<a href="'.getH().'commentform">Skip to comments form</a>'; ?>
and you should be ok.
__________________
If you like my help, please consider donating. I am happy to provide greater detail on this and other topics if you hire me. Please send detailed support requests to me as a private message, thank you.
Juggledad | Forum Moderator/Support

Last edited by juggledad; Jun 15, 2010 at 03:46 AM.
  #6  
Old Feb 21, 2010, 04:00 PM
adum's Avatar
adum
 
85 posts · Jun 2009
You da man Juggledad, that fix looks great. I'll try it out in a bit, pretty sure it will work.
  #7  
Old Jul 5, 2010, 09:59 AM
c4duser
 
24 posts · Nov 2009
Quote:
next change your post footer from
HTML Code:
<a href="#commentform">Skip to comments form</a>
to
HTML Code:
<?php echo '<a href="'.getH().'commentform">Skip to comments form</a>'; ?>
and you should be ok.
I had the same problem, but in the byline for single page posts. The above code does not work with disqus because the id of the form title is not 'commentform' but rather 'dsq-new-post'. However, changing the code as follows, seems to work:

Code:
<?php echo '<a href="'.getH().'dsq-new-post">Skip to comments</a>'; ?>
I still have a problem with the comment link on the front pages (excerpts) byline which does not go to the form, but to the top of the full article page. This is not so bad with the above correction, but it would be nicer to go directly to the form.

If you want to link to jump to the Disqus logo with the 'like' buttons, use 'dsq-community' instead of 'dsq-new-post'.

Thanks for the code, Juggledad!

Last edited by c4duser; Jul 5, 2010 at 10:33 AM. Reason: small correction.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] BUGFIX - 3.4.1-&gt;3.4.6 - Comment form will not show up after first comment on juggledad Comments, trackbacks & pings 49 Jul 29, 2010 06:01 PM
How to change anchor text used for %author-link% ? JFG Post-Kicker, -Byline & -Footer 0 Dec 29, 2009 08:29 AM
[SOLVED] problem with hover effect in anchor link destination hiccupgirl Atahualpa 3 Wordpress theme 1 Oct 16, 2009 06:25 PM
Comment form: how do I clear the data from name and email when the form is submitted? blueprairie Comments, trackbacks & pings 3 Sep 15, 2009 05:15 PM
Clicking "Leave a comment" does not lead to comment form Fux Comments, trackbacks & pings 2 May 4, 2009 11:34 PM


All times are GMT -6. The time now is 10:38 PM.


Powered by vBulletin® Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.