The MU forums have moved to WordPress.org

1 2 3 ... 5

Plugin - List all available themes (125 posts)

  1. NickR
    Member
    Posted 18 years ago #

    I was thinking that a good plugin would be one that lists all themes available. That way, people could view all the themes that you offer without having to sign up. This could be done buy just doing it without a plugin, but then there is the problem of adding new themes and deactivating some themes, you would have to keep going back to that page and adding/deleted code and it would get very annoying. It would also be cool if when you clicked on the screenshot of the theme it took you to a blog on your site that is using that theme to provide a good preview of the theme. I would do this myself, but there is the problem of not knowing enough php to do it...

  2. andrewbillits
    Member
    Posted 18 years ago #

    Alrighty, i'm working a plugin but I need a few people to test it. If you all like it i'll add more features.

    download it here and let me know if it works:

    http://wpmudevorg.wordpress.com/project/List-All-Themes

  3. NickR
    Member
    Posted 18 years ago #

    Got this error:
    Parse error: syntax error, unexpected '}' in /home/nick/public_html/wp-inst/wp-content/mu-plugins/list-all-themes.php on line 32

    So I just removed the } on line 32 and it works. I like it, and I would like to see more features. Here's a list of features I would like to see sometime in the future:
    -Show screenshot of theme
    -Make it not show themes that are disabled in the admin area.
    -If possible, when you click on a theme it takes you to a blog using that theme to preview it.

    Good work on getting this much in just a few hours!

  4. andrewbillits
    Member
    Posted 18 years ago #

    Those should not be a problem to add. I'll get on it in the morning. :)

  5. daki
    Member
    Posted 18 years ago #

    err, how can i add this string to a wordpress page?

    wordpress removes the code all the time :(

  6. andrewbillits
    Member
    Posted 18 years ago #

    Either use the plugin that allows you to use php code on a page or create a template for the page. Either way should work. :)

  7. daki
    Member
    Posted 18 years ago #

    ok :) thx, i made it with the templates :)

  8. daki
    Member
    Posted 18 years ago #

    <?php
    /*
    Plugin Name: List-All-Themes
    Plugin URI: http://www.wpmudev.org/project/list-all-themes
    Description: Creates a list of all themes on a WPMU site
    Author: Andrew Billits
    Author URI:
    Version: 0.0.1
    */

    global $name_or_url;
    global $begin_wrap;
    global $end_wrap;

    function list_all_wpmu_themes() {
    $themes = get_themes();

    $theme_names = array_keys($themes);
    natcasesort($theme_names);

    foreach ($theme_names as $theme_name) {
    if ( $theme_name == $ct->name )
    continue;
    $title = $themes[$theme_name]['Title'];
    $description = $themes[$theme_name]['Description'];
    $author = $themes[$theme_name]['Author'];
    $screenshot = $themes[$theme_name]['Screenshot'];
    ?>
    <?php echo $title; ?> erstellt von <?php echo $author; ?><br>
    /<?php echo $screenshot; ?>"><img width="200" height="150" src="<?php echo $themes[$theme_name]['Template Dir']; ?>/<?php echo $screenshot; ?>">
    _____________________________________

    <?php } // end foreach theme_names
    }

    ?>

    hf ;)

  9. andrewbillits
    Member
    Posted 18 years ago #

    yeah, it's pretty easy to add whatever you want to it :)

  10. NickR
    Member
    Posted 18 years ago #

    I use this code on my page.php file:

    <?php if(is_page('Themes')) list_all_wpmu_themes(); ?>

  11. andrewbillits
    Member
    Posted 18 years ago #

    I worked on the plugin a bit today and got the features listed above working. If anyone would like more features added just list them. I have the day off tomorrow so i'll be finishing it up. :)

  12. NickR
    Member
    Posted 18 years ago #

    Thanks, I will update mine and check it out!!!

  13. andrewbillits
    Member
    Posted 18 years ago #

    it's not uploaded yet ;)

  14. NickR
    Member
    Posted 18 years ago #

    heh, I just noticed...

    could you post a reply when it is? thanks :)

  15. andrewbillits
    Member
    Posted 18 years ago #

    Sure thing. It'll be an hour or so. I'm still at my office and I seriously think i'm the only one left. :)

  16. NickR
    Member
    Posted 18 years ago #

    Have you uploaded the updated plugin?

  17. andrea_r
    Moderator
    Posted 18 years ago #

    argh, borked code in the forum. Andrew, did you update this plugin, and can you re-upload it to wpmudev? Please? :D

    Also, it lists/shows themes are are disabled.

  18. andrewbillits
    Member
    Posted 18 years ago #

    Hmm, I don't think I ever remembered to update the plugin on wpmudev. I'm actually almost finished with a new version of wpmudev.org so as soon as I finish that i'll update all my plugins on wpmudev. :)

    btw, you can get a glimpse of the new wpmudev over at wordpressmu.org if you're interested. I'm working on it there so as to not interupt the daily grind at the actuall site. If you wanna login and play around just use "demo" as the user and pass. It's a bit rough around the edges but i'll be clearing that up tonight.

  19. drmike
    Member
    Posted 18 years ago #

    Oh, lookie. Domain squating. :)

  20. andrea_r
    Moderator
    Posted 18 years ago #

    Woot. And lookin' good too. I hope to get some things squared away here as well, finishing up a few things I/we have in development - like plugins and themes just for MU. Whew. moving slow, but still forwards. Cool.

  21. andrewbillits
    Member
    Posted 18 years ago #

    drmike,

    I know your joking but just to make sure, both wpmudev.org and wordpressmu.org were registered for wpmu about 2 weeks before matt stepped in and setup mu.wordpress.org. Ever since I've been trying to find a good use for the domains. So it's not really domain squating. ;)

    Besides it's not like I make a cent off of wpmudev.org. Sorry if I seem defensive but i've been called many names because of those two domains. ;)

    andrea,

    It's a total rewrite from the ground up so it's been a while in the making. I've also built in a very large api system. My next goal is to work on features (as plugins) that connect wpmu sites (Things such as messaging, etc).

  22. mainframe-junkie
    Member
    Posted 18 years ago #

    @andrewbillits,

    it's impressiv (WOOWHHH)

    A nice new home ;->

  23. thaiwordpress
    Member
    Posted 18 years ago #

    I want Plugin Show detail showpicture Not only showname
    How I Cando or how in can modify???

  24. drmike
    Member
    Posted 18 years ago #

    Best bet would be rip the code out of the wp-admin/themes.php file I would think.

    Either that or copy and paste it to a static page and just update it whenever you add in a new theme.

  25. andrea_r
    Moderator
    Posted 18 years ago #

    And there's actual code to do this further up in this thread...

  26. drmike
    Member
    Posted 18 years ago #

    Andrew, isn't that what the guy who had wp.net said? ;)

    I made a small change to the code to display the screenshot.

    Grab it here:

    http://daria.be/list-all-themes.phps

    You'll probably note that themes designers can't even standardize their screenshots to the correct size. :)

    Just noticed that plugin and the original displays all themes, not just the active ones. *shrug* Oh well.

  27. andrea_r
    Moderator
    Posted 18 years ago #

    Sooooo drmike, what kind of cookies would you like? :D

    Edit: still shows deactivated themes though, or theme that aren't enabled for everyone. Too braind-dead at the moment to figure it out.

  28. drmike
    Member
    Posted 18 years ago #

    Don't even remember the last time I had cookies. :(

  29. andrea_r
    Moderator
    Posted 18 years ago #

    Aw. :(
    Also, I tried that code last night and got an error. Will try and look it over later. One thing I would add would be to include the img width to help with the odd screenshot sizes.

  30. drmike
    Member
    Posted 18 years ago #

    Actually I have on my todo list to go back thru and fix all of the screenshots to make them all the correct size and turn them all into *.jpgs. There's no reason for a 200kb *.png for a screenshot IMO.

1 2 3 ... 5

About this Topic

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