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 26, 2009
4:53 am
Member
Forum Posts: 7
Member Since:
Apr 26, 2009
Offline

Hi! I have a problem. Link "Join the forum discussion on this post" have two position at top and bottom, but i need place link in different place, how can i do it? Maybe just place a php code in different place my blog theme, but what php code? Cry

Apr 26, 2009
7:17 am

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

no other location currently possible without hacking core code. The link is displayed/added to the wp post content in routine sf_blog_show_link() if you wanted to play with it.

Apr 26, 2009
8:37 am
Member
Forum Posts: 7
Member Since:
Apr 26, 2009
Offline

Thnx, I try it

Apr 26, 2009
9:19 am

SP Master
Forum Posts: 23688
Member Since:
Dec 10, 2006
Offline
Apr 26, 2009
12:36 pm
Member
Forum Posts: 7
Member Since:
Apr 26, 2009
Offline

I try this function in index.php, but it's not work:

<div><?php the_time('j M Y') ?> | <?php comments_popup_link('comments, one comment, nocomments)');?> | <?php if(function_exists('the_views')) { the_views(); } ?> | <?php if (function_exists('sf_blog_show_link')) {sf_blog_show_link();} ?>]</div>   

have this warning:

Warning: Missing argument 1 for sf_blog_show_link()

please, help

Apr 26, 2009
12:54 pm

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

you dont want to call that function. It takes the post content as an argument. It then outputs the entire post content with the link to the forum post included. That function is a wp filter on the post content.

I mentioned it so you could take a look at the code to see how we added the link. there is no function available to call and output the link anywhere you want it. you are going to have to code up your own, using the referenced function as a guideline.

Apr 26, 2009
1:12 pm
Member
Forum Posts: 7
Member Since:
Apr 26, 2009
Offline
I want to put a link here, after 'views', as I do that? and, in general, is it possible? I'm not good at php, sorry
Apr 26, 2009
1:20 pm

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

Try something like this where you want it

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

        $sfpostlinking = array();
        $sfpostlinking = get_option('sfpostlinking');
        $text = stripslashes($sfpostlinking['sflinkblogtext']);
        $icon = '<img src=”'.SFRESOURCES.'bloglink.png” alt=”" />';
        $text = str_replace('%ICON%', $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>';
    }

I would bet this fails when it cant find some of the sf routines… you will need to include the required files so they can be found… also, you can change the first three lines if you already have the post id available…

Also, VERY IMPORTANT, but if you cut and paste that, it will mangle the single and double quotes…  type those in by hand…

Apr 26, 2009
1:46 pm
Member
Forum Posts: 7
Member Since:
Apr 26, 2009
Offline

have fatal error Cry

i want put it here:

<div class="clearfloat">
    <?php $values = get_post_custom_values("Image");
    if (isset($values[0])) { ?>
      <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=100&h=65&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="100px" height="65px"  /></a>
      <?php } ?>
    <div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
<div class="meta">[<?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> | <?php if(function_exists('the_views')) { the_views(); } ?>PUT HERE LINK]</div>   
   
</div>

if you have a time, please see index.php

Apr 26, 2009
2:00 pm

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

did you handle the fatal error I told you that you would get??? you are going to have to include the needed sf files… the errors should be descriptive.

Forum Timezone: America/Chicago

Most Users Ever Online: 444

Currently Online: Yellow Swordfish, steve.engelking
56 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: 79531

Moderators: Brandon C (162)

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