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...
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
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!
Those should not be a problem to add. I'll get on it in the morning. :)
err, how can i add this string to a wordpress page?
wordpress removes the code all the time :(
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. :)
ok :) thx, i made it with the templates :)
<?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 ;)
yeah, it's pretty easy to add whatever you want to it :)
I use this code on my page.php file:
<?php if(is_page('Themes')) list_all_wpmu_themes(); ?>
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. :)
Thanks, I will update mine and check it out!!!
heh, I just noticed...
could you post a reply when it is? thanks :)
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. :)
Have you uploaded the updated plugin?
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.
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.
Oh, lookie. Domain squating. :)
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.
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).
mainframe-junkie
Member
Posted 18 years ago #
@andrewbillits,
it's impressiv (WOOWHHH)
A nice new home ;->
I want Plugin Show detail showpicture Not only showname
How I Cando or how in can modify???
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.
And there's actual code to do this further up in this thread...
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.
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.
Don't even remember the last time I had cookies. :(
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.
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.