Jay
Forum Replies Created
-
Forum: Hacks
In reply to: How to add a filter to only show certain authors.Are you thinking more along the lines of like a custom page or something? Take the authors pages for instance, it pulls posts specifically form that one author.
However, if you have a single custom page and want multiple content filters like say one section of the page would pull posts from Jane Doe, and another section would pull content from 01/01/2000 – 01/02/2011 then you would need two WP_Query calls.
Haha, honestly I only needed one person to say “do it” well looks like I know what i’ll be doin’ on my next day off work. ??
Forum: Plugins
In reply to: [Content Warning] [Plugin: Content Warning] Doesn't work with version 3.1This is confirmed working on 3.1 and 3.1.1 (Just updated after checking)
Forum: Hacks
In reply to: Weird add_action wp_insert_postIf I’m getting this right, you’ve only tried the action hook publish_post by posting directly from the admin, how about remotely, via your plugin or whatever?
Forum: Hacks
In reply to: Custom Options not saving, but clearing fields???Situation resolved,
After further testing to figure out my issue, it was of course one of the simple things in life that have eluded me.
FYI
If you set a form field option with defined variables like so:
<input class="checkbox" id="logo_image_enabled" type="checkbox" name="logo_image_enabled" value="true" <?php checked(TRUE, (bool) get_option(THEME_PREFIX.'_logo_image_enabled')); ?> />
You must include the defined variable within the ID and Name attribute of the HTML DOM element also, like so:
<input class="checkbox" id="<?php echo THEME_PREFIX ?>_logo_image_enabled" type="checkbox" name="<?php echo THEME_PREFIX ?>_logo_image_enabled" value="true" <?php checked(TRUE, (bool) get_option(THEME_PREFIX.'_logo_image_enabled')); ?> />
Forum: Hacks
In reply to: Custom Options not saving, but clearing fields???I actually went ahead and edited the add_theme_page function and it has since removed the warning messages:
add_theme_page( "Jenzoo Theme Options", "Theme Options", 'manage_options', 'jenzoo_options', 'theme_options_admin');
I added the ‘manage_options’ rather than assuming the user is level 8.
Forum: Hacks
In reply to: Custom Options not saving, but clearing fields???I too noticed that the URL variable was no longer ‘updated’ yet it was changed to ‘settings-updated’. Therefore for sanity’s sake, I just commented out the line. Settings were still not saved.
To verify that settings could be pulled from the database using the get_option, I manually added values to the custom fields in the wp-options table in my SQL database. The options were pulling properly if manually entered.
Therefore I figured I would just try to overwrite the settings I manually entered via the actual wp-admin options page for the theme. However, when I tried to change the settings in the theme options page itself, it seemed as if the page was just refreshing upon submission, rather than saving.
I’ve even went as far as to overwriting the wp-includes folder with the same one I downloaded within the one’s from the latest.zip file… still nothing.
Additionally I also get the following message directly above my “theme options” link in the admin menu, above the WP-Header, and above my previously stated error message upon submitting the form.
has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /home/jjswebs1/public_html/wp-includes/functions.php on line 3387
Forum: Hacks
In reply to: Custom Options not saving, but clearing fields???Okay I still cannot seem to get this working. So I have resorted to turning on debug mode. Upon submitting the form I get the following message:
Warning: Cannot modify header information – headers already sent by (output started at /home/jjswebs1/public_html/wp-includes/functions.php:3387) in /home/jjswebs1/public_html/wp-includes/pluggable.php on line 897
I have not changed the wp-includes/functions.php, nor have I changed wp-includes/pluggable.php…
The following is an excerpt from pluggable.php:
883 function wp_redirect($location, $status = 302) { 884 global $is_IIS; 885 886 $location = apply_filters('wp_redirect', $location, $status); 887 $status = apply_filters('wp_redirect_status', $status, $location); 888 889 if ( !$location ) // allows the wp_redirect filter to cancel a redirect 890 return false; 891 892 $location = wp_sanitize_redirect($location); 893 894 if ( !$is_IIS && php_sapi_name() != 'cgi-fcgi' ) 895 status_header($status); // This causes problems on IIS and some FastCGI setups 896 897 header("Location: $location", true, $status); 898 }
If someone can help me that’d be awesome, I can’t seem to find any solution to this issue.
Forum: Hacks
In reply to: Custom Options not saving, but clearing fields???In regOptions.php I just used an array to register the options.
<?php $options = array( "column_1_title", "column_1_text", "column_1_l_text", "column_1_p_page", "column_2_title","column_2_text","column_2_l_text","column_2_p_page", "column_3_title", "column_3_text", "column_3_l_text","column_3_p_page", "contact_email","contact_phone","contact_address","logo_image", "logo_image_enabled", "logo_text", "google_analytics"); foreach($options as $option){ register_setting(THEME_PREFIX, THEME_PREFIX."_".$option); } ?>
Here is an example of the google analytics options page also.
<div class="postbox"> <h3>Google Analytics</h3> <p>Paste your Google Analytics code in the box below.</p> <div class="postbox-content"> <div class="option-row"> <div class="option-name"> <label>Analytics Code</label> </div><!--end option-name--> <div class="option-value"> <textarea class="background_pattern_input" id="google_analytics" name="google_analytics" cols="40" rows="5"><?php echo get_option(THEME_PREFIX.'_google_analytics') ?></textarea> </div><!--end option-value--> </div><!--end option-row--> <input type="submit" class="button" value="Save Changes" /> </div><!--end postbox-content--> </div><!--end postbox-->
Forum: Plugins
In reply to: [Media Library] Disallow usage or viewing of other author’s media?friendly bump ??
Forum: Plugins
In reply to: Need plugin player that keep playing while surfing.Well you can use WinAmp to stream music directly from your own computer via an IP address, but you would have to use your own computer, and have it on 24/7.
I’d have to say you may need to use frames, if shoutcast is out of the question, then again, I’m not using streaming music anymore.
Forum: Plugins
In reply to: Need plugin player that keep playing while surfing.I’d say a floating iFrame somewhere on the website should do it…
[EDIT]
Though iFrames aren’t friendly to most ppl, it can still be done.You have two options, either put the plyaer in a frame, or play the music off of a streaming medium like shoutcast.
Forum: Plugins
In reply to: Contributors setting featured images?Umm, it’s the simplest things that surpass the most complex minds… someone please close this, or mark it as resolved.
Forum: Plugins
In reply to: Requiring post approval?Oh this is awesome, thanks. I’ll have a look into wp_insert_post(). It’s been so long since I’ve developed plugins for WP I have forgotten most of everything ??
Forum: Fixing WordPress
In reply to: Google says “This site may harm your computer”No it wasn’t vulnerable but I did report the IP to the host and changed my password to be safe. However I did run the query myself in the URL as attempted by the hacker, nothing, I got a 404 with the url ending in /cat