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
Join the forum discussion on this post
Apr 27, 2009
6:53 am

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

It will take me a couple of days til I have time, but let me see if I can package this into a proper template tag and see if I can get it into the 4.0.3 release that should be coming just about any day now (we plan beta release in step with wp 2.8 beta which is days away)…

Apr 27, 2009
1:02 pm
Member
Forum Posts: 7
Member Since:
Apr 26, 2009
Offline
Thank you, I will wait for the new release, I hope that there will be such an option
Apr 27, 2009
10:15 pm

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

it wont be an option, but a template tag…  ie a code function you can call…  pretty much what you are looking for to put a link outside of the actual post content…

Apr 28, 2009
6:58 pm

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

okay, got this coded up tonight and it will be in 4.0.3…

If you want to add the new tag yourself to try out (add to file sf-tags.php), its:

function sf_blog_linked_tag($postid, $show_img=true)
{
    sf_initialise_globals();

    include_once('forum/sf-links.php');

    $checkrow = sf_blog_links_postmeta('read', $postid, '');
    if ($checkrow)
    {
        $keys = explode('@', $checkrow->meta_value);

        $text = stripslashes(get_option('sflinkblogtext'));
        $icon = '<img src="'.SFRESOURCES.'bloglink.png" alt="" />';
        if ($show_img)
        {
            $text = str_replace('%ICON%', $icon, $text);
           } else {
            $text = str_replace('%ICON%', '', $text);
        }

        $postcount = sf_get_posts_count_in_topic($keys[1]);
        $counttext = ' – ('.$postcount.') '.__("Posts", "sforum");
        echo '<span class="sfforumlink"><a href="'.sf_build_url(sf_get_forum_slug($keys[0]), sf_get_topic_slug($keys[1]), 1, 0).'">'.$text.'</a>'.$counttext.'</span>';
    }
}

and can then be called where you want it to display.  You must pass it the post id, which when in the loop is simply $post->ID

Apr 29, 2009
10:07 am
Member
Forum Posts: 7
Member Since:
Apr 26, 2009
Offline

ок, I add this tag to sf-tags.php, how call this function?

I try this:

<?php if(function_exists('sf_blog_linked_tag')) { sf_blog_linked_tag(); } ?>

and have:

Warning: Missing argument 1 for sf_blog_linked_tag(), called in Z:\\home\\test1.ru\\www\\dai\\wp-content\\themes\\arthemia\\index.php on line 13 and defined in Z:\\home\\test1.ru\\www\\dai\\wp-content\\plugins\\simple-forum\\sf-tags.php on line 115
]

in line 115 I add your code

Apr 29, 2009
11:46 am

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

I said you have to pass it the post id…

sf_blog_linked_tag($post->ID);

if inside the wp loop… there is a second option argument (true/false with true the default) detailing whether or not to display the normal blog linked topic icon with the text.

Forum Timezone: America/Chicago

Most Users Ever Online: 444

Currently Online: steve.engelking
96 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: 2625

Members: 7361

Moderators: 1

Admins: 2

Forum Stats:

Groups: 5

Forums: 16

Topics: 10890

Posts: 79543

Moderators: Brandon C (162)

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