JohnnyN05
Forum Replies Created
-
Forum: Hacks
In reply to: How to make a READ-ONLY field in User Profile? (here's my original code)You can try to disable the input field if the current user is NOT an admin (code not tested)…
<?php $disable_input = 'disabled="disabled"'; if ( current_user_can( 'create_users' ) ) { //<-- Only admins can create_users $disable_input = ''; } ?> <input type="text" name="jobpos" id="jobpos" value="<?php echo esc_attr( get_the_author_meta( 'jobpos', $user->ID ) ); ?>" class="regular-text" <?php echo $disable_input ?> />
Forum: Fixing WordPress
In reply to: Does WordPress Automatically Delete Transients?No one??
Well that’s OK. After some research, it looks like transients expire (delete) when you try to retrieve the same exact transient. If a plugin never tries to retrieve the same transient, it will never get deleted.
The problem I’m experiencing is that the plugin I’m using is naming the transient with an MD5 hash of a URL that contains about 10 different GET variables which are generated by 10 text fields. So this means that it’s rare for visitors to enter the same exact data, which means the transients are never getting called again. Thus the 2GB large table.
Perhaps WordPress needs a garbage collector of some sort for transients…
Forum: Plugins
In reply to: [Plugin: Contact Form 7] Can't send emails to its own domain@mrosner – Yes and no..This actually was my web host company. I called them up and they fixed it.
For my hosting company, when you add a domain to host with them, all requests for that domain checks its own DNS. So when WP sends an email, their network checks their own DNS and of course their DNS doesn’t have google as the MX record.
Forum: Networking WordPress
In reply to: All it says is "Error!"oops…
Looks like I made a mistake. It wasn’t the WP-DownloadManager plugin, it was the “Downlodable File Manager” plugin. I’m such a tool!!
Forum: Networking WordPress
In reply to: All it says is "Error!"Well guys I figured it out! Thanks everyone for the help!
The culprit was the WP-DownloadManager plugin.
I just changed the 2nd line (the if statement) from this…<?php if($_GET['download']!=''){ $data = DB::getById('ahm_files',$_GET[download]); ?> <style> *{ font-family: tahoma; letter-spacing: 0.5px; } input,form,p{ font-size:9pt; } form{text-align:center;} </style>
to this…
<?php if($_GET['download']!='' && is_int($_GET['download'])){ $data = DB::getById('ahm_files',$_GET[download]); ?> <style> *{ font-family: tahoma; letter-spacing: 0.5px; } input,form,p{ font-size:9pt; } form{text-align:center;} </style>
It looks like this plugin relies on
$_GET['download']
and is expecting this to be an int( id ). WordPress’ export function uses$_GET['download']
as a boolean. I have sent an email to the plugin owner.Thanks again!
Forum: Networking WordPress
In reply to: All it says is "Error!"Hey Ipstenu,
I grepped for
letter-spacing: 0.5px
andletter-spacing
and I didn’t find the same code.Unfortunately, I can’t deactivate any plugins as its a live install with quite a few sites on it.
Thanks!
Forum: Networking WordPress
In reply to: All it says is "Error!"Hey Andrea_r,
Thanks for the reply.
I checked the error logs and no entry, but I did check the access logs and the GET request was there with a 200 code.
It might be a plugin that’s issuing this error. I grepped wordpress code for ‘Error!’ and it came up empty. Well there was an ‘Error!’ in wp-includes/ms-deprecated.php, but the HTML output was not the same. It was in the ‘graceful_fail()’ function. I will have to do more research on this.
Thanks!
Forum: Fixing WordPress
In reply to: My custom_post_type fields are showing up in custom fieldsHey James,
Actually, I’ve put all my custom_post_type fields in an array and just called it (for the sake of the example above) products_data. I’ve re-wrote my code to unserialize and extract the array. It still shows up in the Custom Fields area though, but at least its just one field and not a whole bunch.
Thanks!
Forum: Hacks
In reply to: Is there a new site hook?I figured it out.
I used ‘wpmu_new_blog’ and I also used a lower priority than 10. That seems to work.
The problem seemed to be in my PHP code.
Thanks!
Forum: Themes and Templates
In reply to: using Custom $_GET variables with Templates and PermalinksI’ve been trying to do the same thing. I’ve tried all the ways mentioned above. I even tried using the rewrite API, using the add_rewrite_rule() function, but I couldn’t get that to work. I tried editing the .htaccess file and added my own RewriteRule (using the above as an example):
RewriteRule ^/game-db/(.+)/(.+)/$ /game-db?c=$1&e=$2 [NC]
That doesn’t work either. This is really easy to do outside of WordPress (obviously), but I am in need of desperate help.
I searched the forums and there are a lot of posts, but no one has answers to this. Please help!!
Thanks!