A A A

Please consider registering
guest

Log In Register

Register | Lost password?
Advanced Search:

— Forum Scope —



— Match —



— Forum Options —




Wildcard usage:
*  matches any number of characters    %  matches exactly one character

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
"Blog Post - Link Text to Display" formatting issue
Sep 4, 2010
4:28 pm

SP Master
Forum Posts: 23688
Member Since:
Dec 10, 2006
Offline

okay… andy may be back later and can throw in two cents… but something is adding the p tags… have you checked you functions.php file in your theme and see if there is any custom filters in there?

also, maybe switch to the default wp theme real quick like and see what happens….

Sep 4, 2010
4:55 pm

SP Master
Forum Posts: 22240
Member Since:
Nov 9, 2008
Offline

Yes – trying the default theme is a good idea as that would discoiunt one possible cause.

To answer one of your earlier questions – how does the filter decide when and where to put 'p' tags.

The answer is, of course, that ALL content on a web page should have valid markup. Plain text with no tags around it is, really, invalid. So WP tries to correct invalid markup.

A link with text should really have the 'p' tags either side of the 'a' tags not around the text in the middle (i.e. the link text). the WP filter wpautop() has come in for a lot of stick over the years for being, how shall we say it politely…er… patchy.

Yellow Swordfish
Sep 5, 2010
6:42 am
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

Ok here's where things stand.  For diagnostic purposes I switched the site over to the default twenty-ten theme .  I then installed this plugin so that I could execute php in a widget.  I did a search of this plugin and while it does have wpautop functionality, unless you check the box at the bottom of the widget it does not utilize this function (just like the default text widget).  So I stuck in this code (385 being the ID of the only linked post that I have):

<?php sf_blog_linked_tag(385, false); ?>

And it spat out:

<span class="sfforumlink"><a href="http://www.pvpgamer.com/forum/news-discussion/spiffy-new-z-axis-shooter-firefall-announced/"><p> Leave a comment</p>

</a></span>

Sooooo unless the default theme uses wpautop (which is a possibility) then somehow, somewhere, the <p> tags are getting added and wpautop is not to blame (at least not as far as theme/plugin goes).

Any idea where I should go from here?

Sep 5, 2010
8:45 am
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

I've since been informed that wpautop is loaded as part of the wp core, so there's really no getting away from it.  Can you think of a way to test to see if that function is indeed inserting the <p> tags or not? Maybe spitting it out to an email or something?

Sep 5, 2010
9:09 am
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

Ok I repeated the original experiment except this time with the default "WordPress Classic 1.5" theme.  This time I installed this plugin which supposedly blocks ALL wpautop functionality.  The result was the same as always so I'm thinking less and less that it is an wpautop problem.

Any clues?

Sep 5, 2010
11:08 am

SP Master
Forum Posts: 23688
Member Since:
Dec 10, 2006
Offline

I am going to have to take that back…  It is the forum putting those p tags in there… my apologies… since we made a fairly recent change where html is allowed in that text field, we are filtering it adding paragraphs…

If you open up simple-forum/forum/liniking/library/sf-links-supuport.php and around line 120 you will find

$text = sf_filter_text_display($sfpostlinking['sflinkblogtext']);

try changing that to

$text = sf_filter_title_display($sfpostlinking['sflinkblogtext']);

and you should get what you want…

I will  have a discussion with andy on our path forward there as to whether we want to consider a change there or perhaps an option….  again, sorry for not looking hard enough at our stuff…

Sep 5, 2010
11:12 am
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

Hey no worries man.  Thanks for looking into this, on a SUNDAY of all things.  You guys are solidified awesome and keep up the most excellent work.

Sep 5, 2010
3:01 pm

SP Master
Forum Posts: 22240
Member Since:
Nov 9, 2008
Offline

And my apologies for missing that.

Yellow Swordfish
Sep 5, 2010
4:01 pm

SP Master
Forum Posts: 23688
Member Since:
Dec 10, 2006
Offline

working full time, I only have Sat and Sun WinkCool

sorry it took us a while to get there…

Forum Timezone: America/Chicago

Most Users Ever Online: 444

Currently Online: Conrad_Farlow, steve.engelking, joelrob
70 Guest(s)

Currently Browsing this Page:
1 Guest(s)

See All Online Activity

Top Posters:

-Radio-: 1251

Lee H: 606

Luffer: 535

Conrad_Farlow: 502

jim: 478

neon: 263

ovizii: 240

Tal: 240

Member Stats:

Guest Posters: 2626

Members: 7363

Moderators: 1

Admins: 2

Forum Stats:

Groups: 5

Forums: 16

Topics: 10897

Posts: 79582

Moderators: Brandon C (162)

Administrators: Yellow Swordfish (22240), Mr Papa (23688)