wpismypuppet
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Embedding flash object with required Javascript in a page?You’ll need to utilize wp_enqueue_script and wp_register_script to do this properly… use these functions to add the required javascript on the appropriate page, and use a typical embed feature on the page you want to show the flash.
http://codex.wordpress.org/Function_Reference/wp_enqueue_script
Scroll down to the resources section for more detailed info (after you read the document, of course)…
Forum: Fixing WordPress
In reply to: Adding a background or changing color for sidebar area#secondary { background-color: #dfe1f0; }You don’t need the .widget-area as it is a class of the same element. What your css is saying is “look for an element with an ID of secondary, then find an element WITHIN that with a class of .widget-area”.
What you want to say is “look for an element with an ID of secondary” OR “look for an element with a class of widget-area”. Either one will work.
In any event, it’s going to look weird because the width of the sidebar is small and it’s using a margin-right. You’ll want to change this:
#secondary { float: right; margin-right: 7.6%; width: 18.8%; }To this:
#secondary { float: right; padding: 0 3.8%; width: 18.8%; }As a start… you’ll probably want to play around with it more to get it to look right. Also, add your background-color property to this block of css… it’s found on line 94 of your style.css file.
Forum: Hacks
In reply to: What's the best way to link to a plugin function/actionYou are welcome… glad it worked out! But it sounds like you got it on your own without help 🙂
Forum: Fixing WordPress
In reply to: Is it worth changing the login URL to foil brute force hackers?In my opinion… it’s better to write an .htaccess to restrict access to the admin section by IP address only. Place it in the wp-admin folder… something like:
#Deny access to wp-admin folder AuthUserFile /dev/null AuthGroupFile /dev/null AuthName "Access Control" AuthType Basic order deny,allow deny from all #IP addresses allowed to view wp-admin folder allow from 000.000.000.000Only the person with an IP address of 000.000.000.000 can access the login area! Even if they were able to bypass your login page and attempt to access a file within the wp-admin folde, they’d be blocked.
Forum: Hacks
In reply to: What's the best way to link to a plugin function/actionWell, typically what I do is write a link to go to a page that just runs my function(s)… so http://my.wordpress/my-function-page.php. This page will just run a PHP function… whatever I need it to do. At the end of the page, do a header(‘Location: /new-location/’); die();
Of course, on the page running the functions you do have to include the wp-load.php file, and make sure you actually call the function itself to start execution.
Does this make sense?
Forum: Fixing WordPress
In reply to: my domain name helpThis might help…
Forum: Fixing WordPress
In reply to: How to make an image not copyable?No problem… best of luck!
Forum: Hacks
In reply to: What's the best way to link to a plugin function/actionSo let me get this straight… you want to have someone click on a link, be taken to a page that runs some PHP code, then have them redirected to another page?
Are you good at PHP? Does this page that will run a PHP function need access to WordPress functions?
Forum: Fixing WordPress
In reply to: How to make an image not copyable?This is not possible… if you truly want to protect your photos, don’t put them online. Here’s an example… there are programs out the that can capture the entire screen… and then using Adobe Photoshop (or some other photo manipulation program) they can crop out your photo and do whatever they want with it.
Even using a watermark is useless as these photo programs allow cloning or advanced touch-up methods to remove watermarks.
Adding javascript to disable right-clicking is also useless as javascript can be turned off…
The only way you could give some protection to the images is to place them in a password protected area… But even that has drawbacks.
If they are that important to you, don’t put them online. Any and all data placed on the web is free to anyone who wants it.
Forum: Fixing WordPress
In reply to: Image resizing when inserting into a postAside from writing your own PHP code to intercept the files on upload and optimize them yourself, no… there is no way to force WordPress to crunch a file if the dimensions match.
The whole file upload process needs an overhaul in my opinion. Even files that produce errors are still put up on the server incorrectly instead of being removed and an appropriate error message displayed to the end user. What can you do?
We are thinking of writing our own plugin to fix these problems. If we do, I’ll let you know and you’re free to have it! Need permission from the bigwigs to let me spend time on it though…
Forum: Fixing WordPress
In reply to: Custom post type rewrite and custom rewrite rulesFigured it out… needed to write my own rewrite rule. So basically all I changed was on my custom post type “wbc_project” I added:
'rewrite' => false, 'publicly_queryable' => true, 'query_var' => trueNot sure if publicly_queryable is necessary, but the other two definitely are. Then I needed to add this bit of code:
global $wp_rewrite; $project_structure = '/projects/%wbc_project_category%/%wbc_project%'; $wp_rewrite->add_rewrite_tag("%wbc_project%", '([^/]+)', "wbc_project="); $wp_rewrite->add_permastruct('wbc_project', $project_structure, false);I left everything else the same… went into WordPress->settings->permalinks and saved that without making changes (suppose I could have used a flush_rewrite(), but this was easier) and all is working.
Forum: Fixing WordPress
In reply to: Move custom meta box above editorBrilliant!!! Just what I was looking for. I knew there must have been something better than JavaScript to do this. Thanks so much.
Forum: Fixing WordPress
In reply to: Get media settings image size dimensionsThis is exactly what I needed!!! Thanks so much.
When using my code above, I would have to change the table name from site to site… a bit of a nuisance. But with your code, I can add this to my core functionslib.php (my additional functions.php file for functions that never change and are used in all our sites) for all future WordPress sites!!!
Again, thanks so much for helping.
Forum: Fixing WordPress
In reply to: unwanted paragraph tags in the excerptI honestly don’t know what version add_filter() came about… so I’m guessing maybe yours is too old. But I don’t really know. It seems like the css you implemented is doing the trick though…
If you do manage to upgrade, give it a whirl and let us know. Also, the non-manual use of the_excerpt() does strip out all html. So you could always go that route and then just change the excerpt length. Again, let us know the outcome!
Forum: Fixing WordPress
In reply to: unwanted paragraph tags in the excerptYou could also find out what filter is being applied to the manually entered excerpt and remove it:
http://codex.wordpress.org/Function_Reference/remove_filter
Though I’m not sure what filter is being applied.
Or you could try to remove all filters being applied to it:
http://codex.wordpress.org/Function_Reference/remove_all_filters