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
3:10 am
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

I am attempting to redirect people trying to comment on articles to the linked blog posts.  I am able to get the link correctly using this code

<?php sf_blog_linked_tag(%post-id%, false); ?>

The problem is it puts the following link into <p> tags which screws up the single line page footer.  Is there anyway to style the output to remove the <p> tag?

 

Secondly I'd really like to see some way to link blog posts to one forum and blog pages to another.

Also it would be nice to be able to, at the time of posting, be able to uncheck an option somewhere so that you can opt out of linking on that particular page/post.

Sep 4, 2010
6:24 am

SP Master
Forum Posts: 22240
Member Since:
Nov 9, 2008
Online
  1. Actually SP does NOT place paragraph tags around the link and text. That is most likely WP doing that when it formats the display content. SP DOES place 'span' tags around the link and text using a class of 'sfforumlink' which you can style.
  2. No plans currently to separate posts and pages although if we get enough requests for this it will be considered in the future.
  3. You CAN turn the automatic creation of blog linking off for a specific post. The form is part of the write post/page – edit post/page display. Check you are showing it using the 'screen options' at the top.
Yellow Swordfish
Sep 4, 2010
9:20 am
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

hmmm well

<?php sf_blog_linked_tag(%post-id%, false); ?>

in my case returns

<strong>
 

<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>

</strong>

I am really really new with CSS but can you create original tags like <span> and <p> with css classes alone? If so what property should I style to remove the tags? The only thing I have in the "Blog Post – Link Text to Display:" field is:

%ICON% Leave a comment

 

Problem is it is creating a footer spaced like this
Category: Whatever |
Leave a comment
| Edit the post
P.S. I figured out how to opt out of post links about 10 min after I posted that original message.  I am still astounded by how versatile this forum suite is.  Keep up the good work!
Sep 4, 2010
10:13 am

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

can you create original tags like <span> and <p> with css classes alone

not really sure what you are asking…  you can of course have <span class='some-class'> or <span id='some-id'>

a class can be used many times on the same page, but an id can only be used once per page…  is that what you are asking?

I am also trying to understand where those p tags are coming from…  our code does not insert them (as andy mentions in his reply)

Sep 4, 2010
10:36 am
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

Yea I'm kind of clueless as to where they are getting spliced in.  Don't even really know where to look.  I've dumped a bunch of text into that same field trying to see if it is the theme that is appending them but that does not seem to be the case.

As far as I can see, the only thing I'm putting in is this function.

<?php sf_blog_linked_tag(%post-id%, false); ?>

The actual value of %post-id% is a theme variable and is "358" without any formatting.

So with that input, the function is putting 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>

So where the <p> tags are coming from is a mystery to me.

I wanted to point out also that the links inside the post that go to the forum that use the same function also put out code with <p> tags (here is the example from inside that post):

<span class="sfforumlink"><a href="http://www.pvpgamer.com/forum/news-discussion/spiffy-new-z-axis-shooter-firefall-announced/"><p><img src="http://www.pvpgamer.com/wp-content/plugins/simple-forum/styles/icons/default/bloglink.png" alt=""> Leave a comment</p>

</a></span>

You sure the formatting isn't buried in there somewhere?

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

Well I've gone through literally every <p> tag in your code and I can't find where it's being added.

I also was unable to find where the <p> tags are being added to the links inside blog posts that point to the forums.  I'm assuming they are related, the fact that they exist means its happening SOMEWHERE but I am unable to track it down.  I did notice that the filter functions will replace carriage returns with <p> (or was it the other way around?) so that's a fleeting possibility but I don't think it likely.

So I am totally and completely stumped.  Got any suggestions for things I can do to diagnose the problem?

Sep 4, 2010
11:50 am

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

Yes and no.

What you have to remember is that WordPress applies it's filters to the entire page AFTER the content has been grabbed. The routine that adds paragraph tags to where it believes they are missing is called wpautop(). Although – sometimes themes and other plugins will also mess with the formatting and html tags. Especially anything with a link.

SP turns OFF the use of wpautop() because we filter the forum content dependent upon our own set of criteria. But wpautop() IS applied to the final forum page.

This does not effect normal post/page views however where wpautop() (or a theme/plugin imposed filter) will continue to operate. You could try turning it off in your theme (matbe in the functions.php file if you have one) to see what effect it might have. You shouldbe able to do that with the code:

remove_filter('the_content','wpautop');
Yellow Swordfish
Sep 4, 2010
12:12 pm
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

I disabled it and, as far as I can tell, nothing has changed.  I am curious as to what circumstances would make WP "think" a paragraph is needed? Bunch of carriage returns or some such?

 

P.S. I have been attempting to run that function in different places in the posts hoping to get an instance that does not have <p> tags around the text.  Whatever random event is sticking them in there, it's happening consistently.  Even switched over to the Twenty Ten theme and it had the same behavior.

Sep 4, 2010
1:16 pm
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

Just for grins I decided to test it in this format:

<p><?php sf_blog_linked_tag(%post-id%, false); ?></p>

and this was what I got out:

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

</a><p></p>

Crazy.

Sep 4, 2010
2:24 pm
Member
Forum Posts: 29
Member Since:
Sep 4, 2010
Offline

I believe there are some other underlying issues that are causing these errors.  I'll post again once I have a better grasp on what is screwing up.

Forum Timezone: America/Chicago

Most Users Ever Online: 444

Currently Online: Yellow Swordfish, SPQC, steve.engelking, irlandes1, MacBravO
55 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: 10895

Posts: 79576

Moderators: Brandon C (162)

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