The MU forums have moved to WordPress.org

Plugin - List all available themes (125 posts)

  1. billdennis5
    Member
    Posted 15 years ago #

    No problem

    eventually, I will move to wpmu 2.6.

    Until then, I still would like to get this list-all-theme thing fixed. Is there a way to adapt the plugin to NOT use the pagination feature, and just show them all on one page? of use a "previous" "next" navigation?

  2. MazZziKa
    Member
    Posted 15 years ago #

    Parse error: syntax error, unexpected '}' in /mounted-storage/*****/wp-content/mu-plugins/list-all-themes.php on line 75

  3. yyvonne
    Member
    Posted 15 years ago #

    Actually mine is version 1.5, and it works well on my site with pagination.

    http://at.shoutz.com

    The only thing that I can't get it to work is the preview theme.

  4. MazZziKa
    Member
    Posted 15 years ago #

    i fix the error iut was my fault

  5. MazZziKa
    Member
    Posted 15 years ago #

    Fatal error: Call to undefined function get_site_allowed_themes() in /mounted-storage/**********/wp-content/mu-plugins/list-all-themes.php on line 9

  6. MazZziKa
    Member
    Posted 15 years ago #

    any help please

  7. dsader
    Member
    Posted 15 years ago #

    get_site_allowed_themes is a WPMU function

  8. billdennis5
    Member
    Posted 15 years ago #

    Still hoping someone can explain why I'm still getting a Themes list page that generates links like this:

    http://blogpeoria.com/themes/themes.php?pagination=1

    when they should be generating links like this:

    http://blogpeoria.com/themes/?pagination=1

    The plugin I'm using is here:

    http://pastebin.com/f99a0c8c

    Could it have something do do with Line 59:

    $activate_link = wp_nonce_url("themes.php?action=activate&pagination=".$actual_page."&template=".urlencode($template)."&stylesheet=".urlencode($stylesheet), 'switch-theme_' . $template);

    OR

    Is it possible I've configured the plugin wrong in the admin panel?

    Also, I don't see any need for the images being generated on the Page to link to anything or to try to activate anything when clicked. All I want is for the images to display on the Page, not do anything when clicked. I'm trying to display the available themes for potential users.

  9. MazZziKa
    Member
    Posted 15 years ago #

    :D How :S
    from where to get the function to add it in wpmu-functions.php

  10. MrBrian
    Member
    Posted 15 years ago #

    Don't do anything with wpmu-functions.php - he means you can modify the plugin to how you want using that function.

  11. MrBrian
    Member
    Posted 15 years ago #

    And dennis:

    I just tried out your code myself and the pagination is working fine. Any caching perhaps going on? Delete and reupload the plugin file too, just to cover all your bases.

  12. MazZziKa
    Member
    Posted 15 years ago #

    Fatal error: Call to undefined function get_site_allowed_themes() in /mounted-storage/**********/wp-content/mu-plugins/list-all-themes.php on line 9

    so how can i fix this error

  13. billdennis5
    Member
    Posted 15 years ago #

    Hmmm seems fixed now.

    Thank you call.

  14. MazZziKa
    Member
    Posted 15 years ago #

    i use this in my page.php to call the function
    <?php if(is_page('Themes')) list_all_wpmu_themes(); ?>

  15. MrBrian
    Member
    Posted 15 years ago #

    I've improved this a bit for you guys. The pagination is smarter, the theme display is table-like, and it only displays allowed themes. I removed the activation part though.. i don't see the point of having it.

    http://pastebin.com/f4ffc1e45

  16. MazZziKa
    Member
    Posted 15 years ago #

    thx MrBrain .. Work great now
    http://mychatoo.com/themes/

  17. billdennis5
    Member
    Posted 15 years ago #

    Sorry: Getting the following error:

    Parse error: syntax error, unexpected '}' in /.../blogpeoria.com/html/wp-content/mu-plugins/list-all-themes.php on line 87

  18. MrBrian
    Member
    Posted 15 years ago #

    You probably pasted over the function wrong and there's an extra }.

  19. billdennis5
    Member
    Posted 15 years ago #

    I downloaded the file as it was posted in pastebin.

  20. MrBrian
    Member
    Posted 15 years ago #

    I simply pasted the function, there's no need for a plugin as you can just stick the function in your theme's functions.php file. I've checked and there's no syntax errors with it.

  21. billdennis5
    Member
    Posted 15 years ago #

    Ah ... never thought of that.

    Any advice for where to paste it in the functions.php file?

    I know ... it's such a n00b question.

  22. MrBrian
    Member
    Posted 15 years ago #

    The end... lol

    Before the ?> of course :P.

  23. MazZziKa
    Member
    Posted 15 years ago #

    u forget to add <?php ?>

  24. billdennis5
    Member
    Posted 15 years ago #

    Like I said: n00b.

    Thank you.

  25. billdennis5
    Member
    Posted 15 years ago #

    Um .... looks good except that the screen shots don't show up. Getting broken image links in IE. No images without broken image links in FireFox.

    http://blogpeoria.com/themes/

  26. billdennis5
    Member
    Posted 15 years ago #

    This is the URL for the imkage as it's being rendered in my browser:

    ~http://blogpeoria.com/wp-contentwp-content/themes/coffee-desk/screenshot.png`

    Note the "wp-contentwpcontent"

  27. MrBrian
    Member
    Posted 15 years ago #

    Strange.. well go ahead and modify line 81. I made it use the new WP_CONTENT_URL constant, so just replace the constant on that line with '/wp-content'.

  28. billdennis5
    Member
    Posted 15 years ago #

    Are you saying to replace "WP_CONTENT_URL" with "/wp-content""

    You forget what I n00b I am.

  29. billdennis5
    Member
    Posted 15 years ago #

    New information:

    I am using WPMu 1.5.1
    I am MOSTLY certain you meant for that code to be added to /wp-includes/functions.php and not that in /themes/home/functions.php. Right.

  30. MrBrian
    Member
    Posted 15 years ago #

    The constant was introduced in 2.6, so that's why. I meant just replace it in the function, that's it.

About this Topic

  • Started 18 years ago by NickR
  • Latest reply from billdennis5