Sorry, here it is.
Sorry, here it is.
Are you sure the pastebin code is directly from your source file?
this line
$output .= ''.$i.'';
Shouldn't this code make an href="yadda.php?page=$i"
?
The screenshots won't show with wpmu2.6, must use a defined constant WP_CONTENT_URL.
Amended!
Aha
$output .= '<a href="themes.php?pagination='.$i.'">'.$i.'</a>';
becomes
$output .= '<a href="?pagination='.$i.'">'.$i.'</a>';
And I'm flippin pages!
FYI the screenshots:
Pre 2.6
<img src="<?php echo get_option('siteurl') . '/' . $stylesheet_dir . '/' . $screenshot; ?>" alt="<?php echo attribute_escape(strip_tags($title)); ?>" />
WPMU2.6+
<img src="<?php echo WP_CONTENT_URL . $stylesheet_dir . '/' . $screenshot; ?>" alt="<?php echo attribute_escape(strip_tags($title)); ?>" />
Excellent!
Anyway to preview the themes?
Use the same $preview_link in themes.php(version 2.6) and you'll get a preview in a new window.
Not sure if thickbox/theme-preview scripts will work asis for fancy-shmancy, though.
There's no way to add to version 1.5?
Yup, I used to use ...
http://boren.nu/downloads/preview_theme.phps
You may want to remove the check for user-level if you are using the function, say, on a theme-showcase on the front page.
Is this for plugin folder or mu-plugin folder?
It goes in mu-plugin. do you not know the difference?
I uploaded it to my mu-plugin, login as admin, and try to view one of my theme at http://blog.mysite.com/index.php?preview_theme=astro
It doesn't work, bring me back to index page http://blog.mysite.com/
i wanna to create a page with this themes
so i search and find plugin that allows you to make certain WordPress pages or posts link to a URL of your choosing, instead of their WordPress page or post URL
then i create a admin_themes.php file in my theme directry
<?php get_header(); ?>
<!-- Container -->
<div class="CON">
<!-- Start SC -->
<div class="SCS">
<?php list_all_wpmu_themes();?>
</div>
<!-- End SC -->
<?php get_sidebar(); ?>
</div>
<!-- End CON -->
<?php get_footer(); ?>
but i still have error
Fatal error: Call to undefined function get_header() in /mounted-storage/******/wp-content/themes/themename/admin_theme.php on line 1
I'm using the list_all_themes plugin from WPMUDEV.
I'm been able to write a Page that calls up a list, but no screen shot and no descriptions of the themes that are listed. And I would like to block themes that are not approved and available for use.
This is the php call I am using on the Page template:
<?php list_all_wpmu_themes(); ?>
The result is this: http://blogpeoria.com/themes/
I cannot find any instructions on how to configure it.
Any advice?
By the way: Andrea ROCKS!
1.No ScreenShot appear
2.No link work write
3.Pagination not work
4.still can't call the function
Well, I'm now using Yyvonne's plugin as it appears in the pastebin, and it all works except the pagination, which generates a 404 message when I click on the numbers at the bottom on the page.
I believe I need to add the following piece of code on the theme.php template:
`<?php if(function_exists('wp_page_numbers')) { wp_page_numbers(); } ?>'
Normally, I'd replace this snipit of code next_posts_link()' and 'previous_posts_link()
but it is nowhere to be found on this page template.
Any ideas?
Actually:
I added the code for pagination at the bottom of the themes.php template.
The first page comes in fine.
When I try to go to the second page, I get a 401 message saying themes.php cannot be found on this server.
Anyway to change this plugin to NOT use pagination and use next, previous instead?
here is the Page in question: http://blogpeoria.com/themes/themes.php
It will work if you go to http://blogpeoria.com/themes/?pagination=2, but the actual link of the numbers is http://blogpeoria.com/themes/theme.php?pagination=2. Need to edit it in the plugin.
So, I should manually edit the plugin from:
`$output .= ''.$i.'';"
to $output .= '<a href="?pagination='.$i.'">'.$i.'</a>';
Which I just now realized is what it says in a post further back in the thread.
Duh.
lol, go ahead and post the updated working version using pastebin to stop anyone else from falling into that trap ;).
Well, I hesitate because I made the change, but I keep getting the following results:
http://blogpeoria.com/themes/themes.php?pagination=4
In Pastebin, it's line 80
The whole point is it shouldn't link to themes.php. You missed the edit on line 41 also, there are two spots.
OK, I don't think I missed anything, but here's the plugin. Maybe you can see where I've messed up:
OH! I gather that line 59 needs to change from :
$activate_link = wp_nonce_url("themes.php?action=activate&pagination=".$actual_page."&template=".urlencode($template)."&stylesheet=".urlencode($stylesheet), 'switch-theme_' . $template);
to:
$activate_link = wp_nonce_url("?action=activate&pagination=".$actual_page."&template=".urlencode($template)."&stylesheet=".urlencode($stylesheet), 'switch-theme_' . $template);
Correct me if I'm wrong.
I'm not sure, I haven't used the plugin. That looks like the link for activating the plugin, so if you don't have a problem with it, don't change it :).
Here's what I have in a theme's functions.php, add a call to list_all_wpmu_themes() in a page template ... for wpmu2.6(added thickbox etc):
Ah ... so what you are saying is that this won't work in wpmu 1.5.1 ...
Sorry I hijacked the thread, but yes thickbox is only "... for wpmu2.6"