Search

bbPress Showcase » Plugins by _ck_

own my-views extention, can't get it to work :(

RSS

  1. Null
    User has not uploaded an avatar

    member
    Joined: May '08
    Posts: 43

    offline

    Hi,

    I am working on converting an old (working) plugin of my to work with the my-wiews plugin. The old plugin (a blog) requiers 3 php files (1 template file, 1 plugin file and 1 page file). With the my-view plugin I want to reduce this to just 1 file.

    The idea I had was simply to get the old plugin php file to work with the my-view plugin. This part I've got working. I can edit stuff in the admin. The problem is putting the old template file into the new my-views plugin extention to show the blog page. It simply wont show anything. I did some dirty tweaking and got some data shown, but it was incorrect and links where broken. I hope you can help me fix this so I can release my-view-blog extention to the world.

    In short: Admin part is working, but I cant show the selected data (the topics pulled from the choosen forum by a function called: bb_get_blog();
    )
    . I know this all sounds a bit cloudy, so if you need more info, plz let me know.

    I've attached the new plugin file (with comments) and I hope you have the time to take a look at it. All that left is the old 2 php files (template and basic page file.

    Posted 3 years ago #
  2. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    Don't bother posting long code here,
    use http://pastebin.com instead and just post the link.

    Posted 3 years ago #
  3. Null
    User has not uploaded an avatar

    member
    Joined: May '08
    Posts: 43

    offline

    Ok:
    http://pastebin.com/m33c7df41

    The thing is that the admin works fine, but when it needs to display the results on the view page, i get an error in stead of the selected topics. What am i missing?

    Posted 3 years ago #
  4. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    Telling me the error and what version of bbpress you are using would help.

    Posted 3 years ago #
  5. Null
    User has not uploaded an avatar

    member
    Joined: May '08
    Posts: 43

    offline

    Ofcourse:
    Parse error: syntax error, unexpected T_ELSE in /www.bbportal.org/mssp/my-plugins/bbPortal.php on line 154

    But removing this line will just result in a different error etc etc.

    Funny fact: when adding
    require('./bb-load.php');

    $bb_db_override = false;
    do_action( 'bb_index.php_pre_db', '' );

    if ( isset($_GET['new']) && '1' == $_GET['new'] ) :
    $forums = false;
    elseif ( !$bb_db_override ) :
    $forums = get_forums();
    $topics = get_latest_topics();
    $super_stickies = get_sticky_topics();
    endif;

    do_action( 'bb_index.php', '' );

    I get some (but incorrect) data. Like posted 44 years ago, but the forum poster etc isn't showing up... I am realy puzzled here

    Thanks

    Ow and I am using the latest stabel release 0.9.0.4

    Posted 3 years ago #
  6. Null
    User has not uploaded an avatar

    member
    Joined: May '08
    Posts: 43

    offline

    Update:
    http://pastebin.com/m485cce67

    Did some changes and I see results now, but only partly.

    I can see the data from the selected posts, but that's about it.

    I don't see the topic title
    I see the posted time, but it's wrong: 39 years
    I can't see the posters name (it should be behind the posted time)
    I see the comments link, but it aint linking or counting the comments.

    Demo:
    http://www.bbportal.org/mssp/view.php?view=blog

    I think I am close, but why isn't the data showing?

    Posted 3 years ago #
  7. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    Your problem is seemingly simple.

    You are inside a function (function bb_get_blog )
    yet you don't have global $topic; within the function
    so the current topic can't be seen when you call bbPress functions.

    Posted 3 years ago #
  8. Null
    User has not uploaded an avatar

    member
    Joined: May '08
    Posts: 43

    offline

    Omg I knew it was a small thing That did the trick! Thanks!!

    I have another question though. I also use the smiley plugin, but the smilcode (like :mrgreen:) aren't converted/filtered. How can I get the smilies shown on this new page too? Just like in the forums. (ofcourse only when the plugin is activated)

    Thanks

    Kind regards,

    Posted 3 years ago #
  9. _ck_
    _ck_

    senior admin
    Joined: Jul '06
    Posts: 908

    offline

    To get smilie output you'd have to run the content though the post_text filter.

    Posted 3 years ago #
  10. Null
    User has not uploaded an avatar

    member
    Joined: May '08
    Posts: 43

    offline

    Ah ok, with a little if to check if the plugin is active.

    Ok problem solved

    Posted 3 years ago #

RSS feed for this topic

Post a reply to “own my-views extention, can't get it to work :(”

You must log in to post.

keep _ck_ coding >> donate $5 <<     Theme Switcher:
32 users online from in the past 30 minutes. 15 bots 17 guests
7,413 views today 8,426 yesterday 16,043 peak. Most at once 50 today 62 yesterday 131 peak. Visited today: Amylawrence, guava, JeffreyCasivant, wigbuy123, gdfddfs, nandao, _ck_, summerfortun
2,288 posts in 394 topics over 66 months by 430 of 2,167 members. Latest: watchessaleus, wigbuy123, JeffreyCasivant