The MU forums have moved to WordPress.org

AHP Sitewide Recent Post Plugin won't work :( (31 posts)

  1. Christophe26
    Member
    Posted 15 years ago #

    Hi,

    I'm trying to install this plugin:

    http://wpmudevorg.wordpress.com/project/AHP-Sitewide-Recent-Posts-for-WPMU

    If I put the .php file in the /MU-plugins directory I can't see it anywhere (and it don't work) and if I put it in the /plugins directory I can activate it, but it still don't work.

    Is here someone who has experience with this plugin?

    When I make new blog posts in random blogs, it won't show up in the main blog :(

    Thanks!

  2. andrea_r
    Moderator
    Posted 15 years ago #

    Did you put the function call on your main blog's template?

    When you put the plugin in mu-plugins, no - you won't see it anywhere. It does not create a menu.

  3. Christophe26
    Member
    Posted 15 years ago #

    No, I didn't. Is this the correct one?

    http://www.metablog.us/blogging/ahp-recent-posts-plugin-for-wordpress-mu/

    So I have to place this in index.php of my theme? At the bottom, or after

    <?php the_content('[Read more →]'); ?>

    It's new for me. Thank you for your help!`

  4. azizpoonawalla
    Member
    Posted 15 years ago #

    Hi,

    I am the plugin author. To use the plugin, you will need to insert a function call like this:

    <?php ahp_recent_posts(5, 90, 30, "<li>", "</li>", 1); ?>

    in the template files, NOT the body of the post. This means you will need access to the source files of your wpmu installation, via FTP.

    I will be attempting to widgetize the plugin soon which will make the plugin visible without having to edit teh template source files. Until then however you will need to manually edit the source template files to use this plugin.

    Regards

    Aziz Poonawalla
    http://metaBLOG.us

  5. Christophe26
    Member
    Posted 15 years ago #

    Hi Aziz, Great Plugin!

    With template files, do you mean the themes files? or the template.php file?

    Do I just have to update 1 file? Which one exactly? And where do I have to past this code? (end, middle, ...)

    Wordpress MU is new for me, so I thank you for any help.

    Kind regards,
    Christophe

  6. azizpoonawalla
    Member
    Posted 15 years ago #

    Christophe,

    yes, I mean the themes file s- for example, if you want the recent posts to appear in your sidebar, put the function call in your sidebar.php file. If you want them in your main index page, put the function call in home.php, etc. You can also use a widget like Otto's Exec PhP or Daiko's Text Widget to run any arbitrary PHP code, so in that case you'd just put teh function call in the widget instead (thats how I do it at present).

    Thanks for the kind words. If you have feature requests, be sure to leave them in comments at the plugin homepage!

    regards, Aziz
    http://metaBLOG.us

  7. Christophe26
    Member
    Posted 15 years ago #

    Hi,

    I uploaded the list-all.php to my /mu-plugins and I included
    (<?php ahp_recent_posts(5, 90, 30, "<li>", "</li>", 1); ?> in the index.php (also tried the sidebar)

    Yet I get an error:

    Fatal error: Call to undefined function ahp_recent_posts() in /vhosts/palmvrienden.net/httpdocs/wp-content/themes/Cutline 1.1/index.php on line 39

    Am I missing something here ... I have read in the instructions.txt which came with the plugin to set some parameters. I suppose they are set as default, or do I have to manually edit them? If yes, how do I do this?

    Thank you (again :)
    Christophe

  8. azizpoonawalla
    Member
    Posted 15 years ago #

    you will need to download my plugin, which is not list-all.php but rather the code available for download from here:

    http://wpmudevorg.wordpress.com/project/AHP-Sitewide-Recent-Posts-for-WPMU

    and put that plugin in your mu-plugins folder.

  9. Christophe26
    Member
    Posted 15 years ago #

    Hi,

    I am sorry, but it still won't work :(

    The idea is to automaticly post all the new posts (not updated) of all bloggers into the main blog. Each new post must have a direct link to the author of that post and their artikel.

    Am I missing something here?

    I suppose I have to call the function in the index.php of the main blog. Where exactly do I have to paste the code:

    <?php ahp_recent_posts(5, 90, 30, "<li>", "</li>", 1); ?>

    I tried some places (end, middle, begin) but it won't work. Also in the sidebar didn't work.

    Please help me with this.

    Thanks :)

    Regards,
    Christophe (Belgium)

  10. alexguzun
    Member
    Posted 15 years ago #

    Guys, what could be wrong when Executable PHP (or any else) wont save php function, but is working well with text only?

  11. andrea_r
    Moderator
    Posted 15 years ago #

    Because MU strips out all scripts and code unless you allow for it.

  12. alexguzun
    Member
    Posted 15 years ago #

    Please, how could i allow it?

  13. alexguzun
    Member
    Posted 15 years ago #

    and if .. is it safe?

  14. Christophe26
    Member
    Posted 15 years ago #

    Hi Aziz,

    I've seen that you changed the plugin page:

    http://wpmudevorg.wordpress.com/project/AHP-Sitewide-Recent-Posts-for-WPMU

    The function call is not visible in IE and just a part in FF. I have view your source code, and I saw you put this code between ` tags, yet it is not visible.

    Ok, I tried a lot of things but it still don't work. I just have to put the 471453338_ahp_recent_posts_0.5.php file in the mu-plugins folder, and copy the call funcion
    <?php ahp_recent_posts(5, 90, 30, "<li>", "</li>", 1); ?>
    in the sidebar???

    Am I missing something here. I'm searching for days now, and would be really glad this plugin would work :)

    I'm dreaming of php code (which I don't understand yet) lately :)

    Please help me with this ... someone?

    Kind regards,
    Christophe

    PS: I will definitely vote at the WPMU plugin competition, once its working!

  15. andrea_r
    Moderator
    Posted 15 years ago #

    "Ok, I tried a lot of things but it still don't work. I just have to put the 471453338_ahp_recent_posts_0.5.php file in the mu-plugins folder, and copy the call funcion
    <?php ahp_recent_posts(5, 90, 30, "

  16. ", "
  17. ", 1); ?>
    in the sidebar??? "

    Yes, that's exactly what you do - but not in a sidebar text widget, you have to edit the theme's template files and stick in one of those, wherever you want it to show.

  • Christophe26
    Member
    Posted 15 years ago #

    I didn't put it in a widget, but just in a the sidebar.php themefile.

    http://palmvrienden.net

    See, nothing shows up :(

    I also tried the index.php file.

    Any possible reason why it won't work for me?

  • Christophe26
    Member
    Posted 15 years ago #

    Or is there maybe a similar plugin ...?

  • andrea_r
    Moderator
    Posted 15 years ago #

    Any posts within the last 24 hours?
    Are the blogs public?

    If they don't meet that criteria, they won't show.

  • azizpoonawalla
    Member
    Posted 15 years ago #

    argh - i will edit my page at wpmudev asap. it was correct earlier but for some reason last time I edited the page it messed up my formatting. thanks for pointing this out...

  • Christophe26
    Member
    Posted 15 years ago #

    Hi Andrea,

    Is it possible to edit your earlier post please ...

    Just put the php code between Otherwise all the following posts will be in a centered list.

    Thanks!

    _________________________________

    And I have made each time I tested a new post, but it won't show up :( And yes, the blogs are public. I don't know what I do wrong. It still in my sidebare at http://palmvrienden.net

  • andrea_r
    Moderator
    Posted 15 years ago #

    Can't edit previous posts after a certain timeframe.

    your sidebar is widgetized. If you pasted the code in sidebar.php within the widget if statement, and you're using widgets, then you won't see what's coded in the original sidebar file.

    Go back to sidebar.php
    Find the part where it says endif, near the bottom, right before the last ul and div tag of the sidebar.
    paste that code *after* the endif.

  • Christophe26
    Member
    Posted 15 years ago #

    <div style="text-align: left;">
    Thanks for your help!

    I did what you said and it still does nothing. I mean absolutely nothing, not even an error :(

    I also tried the page.php, single.php, index.php

    Hmm...

    I uploaded the 471453338_ahp_recent_posts_0.5.php plugin to my mu-plugins folder, and copy/paste the function in the sidebar.php (after endif, and before last
    ul-tag)

    Don't work :( snif ...

    I didn't edit anything in the 471453338_ahp_recent_posts_0.5.php plugin, hope that's ok? I don't have to change something form NO to YES or something like that?

    Is this the only plugin that makes it possible to show all the new posts on the main blog?

    Kind regards,
    Christophe

    </div> (didn't work :)

  • andrea_r
    Moderator
    Posted 15 years ago #

    Nope, it's not the only one, just one of a dozen variations. :)

  • Christophe26
    Member
    Posted 15 years ago #

    Yes, variations, of the same plugin Ron Rennick. Or are there some completely other plugins to.

    By the way, other plugins don't seem to work either in my mu-plugin. Those are plugins for 'normal wordpress' which I put in the mu-folder. But they won't show up anywhere ... Is this normal? I do can put them in the plugin folder, and activate them, but not in the mu-plugin folder. This does nothing, it seems ...

    Regards,
    Christophe

  • andrea_r
    Moderator
    Posted 15 years ago #

    Yep, Ron is my husband.

    If you put a plugin *folder* in mu-plugins, no it won't run. You have to put the actual file sin there, or a file including the plugin folder.

    Plugins in mu-plugins are automatically run, not auto-activated, and executed on every page load, so only put in ones that are meant for that folder.

  • Ovidiu
    Member
    Posted 15 years ago #

    @Christophe26

    I don't want to be rude, but these people here are really trying to help you and you seem to be trying really hard to get this to run, but you need to learn at least a little basic PHP skills.
    Imagine these guys manage to help you run this plugin, but what will you do if users of YOUR wpmu installation have problems?
    YOU need to solve those, you can't come asking here for help with every little problem, as sometimes, the responses are not that fast.
    YOU need to be able to solve them, and solve them fast, otherwise you will disappoint your users, they will move on, etc.

    Just a little thought and good luck :-)

  • azizpoonawalla
    Member
    Posted 15 years ago #

    Christophe, can you please go to azizhp.pastebin.com and paste in the code for your entire sidebar.php file including the function call to my plugin? Then let us know and we will take a look to see if there's something wrong with your function call or something else.

    the plugin should work as-is without any modifications - the function is completely controlled by the arguments to the function call.

  • Christophe26
    Member
    Posted 15 years ago #

    First time I use pastebin. Hope it is alright.

    http://azizhp.pastebin.com/m32f9778f

    The 471453338_ahp_recent_posts_0.5.php file is still in my /mu-plugins

    Thanks!

  • Christophe26
    Member
    Posted 15 years ago #

    Hi Aziz,

    I've seen you have an article about the plugin on http://wpmu.org/category/plugins/

    Yet the Sample function call is misspelled.

    You used ' instead of "

    Maybe you can change this?

    Kind regards,
    Christophe

    PS: Have you looked at my pastebin? I'm still testing, cause I really would like this plugin to work. http://azizhp.pastebin.com/m32f9778f

  • andrea_r
    Moderator
    Posted 15 years ago #

    The plugin worked fine for me.

  • 1 2

    About this Topic