huggie
Forum Replies Created
-
Forum: Hacks
In reply to: Keep a plugin tidyXephan, I found a way to do it by looking at some other plugins that I have installed.
I can be done using the register_uninstall_hook() function, but also via a simple method of creating an uninstall.php in the root of the plugin directory and checking for a constant called WP_UNINSTALL_PLUGIN before executing it.
The details are in the provided link.
Rich
Forum: Hacks
In reply to: Keep a plugin tidyOK, I’ll look into that then. I’m not sure how I’d present that to the user, but I’m sure I’ll find a way.
I think I’ll still look for some plugins that have similar functionality.
Forum: Hacks
In reply to: Keep a plugin tidyThanks Xephan, I guess I could add a setting for it.
My only issue is that if they edit the settings when they activate the plugin and say ‘When deactivating the plugin don’t delete the database’, they may have forgotten about it when they actually want to delete it.
I hate viewing my blog database and seeing tables for plugins that I installed to test and then didn’t like, or plugins that I deleted months earlier.
Cheers
RichForum: Plugins
In reply to: Error when using GET on admin pageThis can be ignored now, I realised what the issue was.
?page=my-plugin/my_plugin.php
was already being passed as a parameter to options-general.php so instead of adding?action=trash
I should have been adding&action=trash
Rich
Forum: Fixing WordPress
In reply to: get_bloginfo or get_optionOK, thanks for the heads up. In that case I’ll probably use
get_bloginfo()
for core WordPress information andget_option()
for plugin related info.Forum: Themes and Templates
In reply to: Is it possible to have a second comments templateMake sure that the new comments page is pointing to the correct place and all references point to it, not the old one.
Forum: Themes and Templates
In reply to: Conditional tag if $customfield existsGlad that sorted it.
Forum: Themes and Templates
In reply to: Text indentation in main postGlad you sorted it. Firebug is how I diagnose all those problems.
Forum: Themes and Templates
In reply to: Using get_posts in SidebarYeah, you’re probably right. I’d only use get_posts() on the main loop and wp_query() on the sidebar.
Forum: Themes and Templates
In reply to: Conditional tag if $customfield existsMichael’s suggestion was correct and I’ve edited the rest of the code here:
Forum: Themes and Templates
In reply to: Text indentation in main postChange line 33 in wp-content/themes/f8-lite/css/screen.css from this:
p {margin:0 0 1.5em;}
to this:
p {margin:0 0 1.5em 20px;}
This will indent the text to the same level as your headers.
Also, as a side note, this was easy to fix, the reason it probably wasn’t resolved by someone earlier is that you typed the URL incorrectly. Attention to detail will probably get you more responses, sooner ??
It’s usually the case that when giving WordPress it’s own directory, somewhere along the line someone’s going to get the bloginfo() or get_options() parameters wrong.
I’ve posted a comment on the author’s site in order to try and get it included in the next version of the theme.
OK, I’ve had a look and think I’ve worked it out. It’s an issue with the theme.
Make sure you backup the following two files as I can’t guarantee that this wont mess something else up as I haven’t had long to test it:
admin/theme-settings.php
lib/widgets.phpChange line 20 in theme-settings.php from this:
<iframe id="themepreview" name="themepreview" src="<?php echo get_option('siteurl'); ?>/?preview=1"></iframe>
To this:
<iframe id="themepreview" name="themepreview" src="<?php echo get_option('home'); ?>/?preview=1"></iframe>
Change line 380 in widgets.php from this:
type: "GET",url: "<?php bloginfo('wpurl'); ?>",data: { widget_id: '<?php echo $id; ?>', twituser: '<?php echo $twituser; ?>', twitcount: '<?php echo $twitcount; ?>', get_twitter_data: 1 },
To this:
type: "GET",url: "<?php bloginfo('url'); ?>",data: { widget_id: '<?php echo $id; ?>', twituser: '<?php echo $twituser; ?>', twitcount: '<?php echo $twitcount; ?>', get_twitter_data: 1 },
It works, but I haven’t done a lot of testing.
Rich
Forum: Themes and Templates
In reply to: Search Function Within Custom Category TemplateHidden fields are a way of doing it.
Forum: Themes and Templates
In reply to: Open a post in lightbox or populate a divNo problem, I’m glad it worked out.