deanes02
Forum Replies Created
-
Forum: Plugins
In reply to: Simplify default passwords – how to?here’s the answer —
in wp-includes/pluggable.php – turn off special chars, reduce the length and reduce the amount of chars it can randonly select from…
function wp_generate_password($length = 5, $special_chars = false) { $chars = 'ABCDEFGH23456789'; if ( $special_chars ) $chars .= '!@#$%^&*()'; $password = ''; for ( $i = 0; $i < $length; $i++ ) $password .= substr($chars, wp_rand(0, strlen($chars) - 1), 1); return $password; }
for bbPress you do a similar thing in \forums\bb-includes\functions.bb-pluggable.php
function bb_generate_password( $length = 5, $special_chars = false ) { //return WP_Pass::generate_password( $length, $special_chars ); $chars = 'abcd23456789'; if ( $special_chars ) $chars .= '!@#$%^&*()'; $password = ''; for ( $i = 0; $i < $length; $i++ ) $password .= substr($chars, rand(0, strlen($chars) - 1), 1); return $password; }
Forum: Plugins
In reply to: Simplify default passwords – how to?actually, can i change that to a hack way please! I’m using bbpress as well and it also generates these super complicated passwords.
Thanks
Forum: Fixing WordPress
In reply to: Force ONLY relative linksAt least I now understand why they don’t have the relative link option and thank you for that – it makes perfect sense.
Is there an SQL query that does a find and replace across the whole database? The following code does it on a table by table basis —
update [table_name] set [field_name] = replace([field_name],'[string_to_find]','[string_to_replace]');
Unless there is an SQL query to find and replace for the whole database, I would think that Exporting the whole database (using phpMyAdmin) then doing a find and replace in your text editor (I use PSpad) and importing the database again, seems like a quicker way.
Any thoughts?
Forum: Fixing WordPress
In reply to: Force ONLY relative linksThanks. That was the process I was using – pretty much. Its easy enough to export the database, do a find and replace for the web addresses and import the database again.
However I was kind of hoping the good people at wordpress would have a little tickbox somewhere, that said, “only use relative links”….
If they do, or intend to please let me know. If they don’t then I wonder why not?
Forum: Plugins
In reply to: How to password protect – “dynamic” web pageFYI – the page “Private Items” does not exist as an actual WP page or post. It is created on the fly by plugin magic…
Forum: Fixing WordPress
In reply to: Search function behaving badlySorry being stupid… I copied search.php from the default theme into my theme and everything worked as I wanted.
Hopefully this will help someone else…
Forum: Fixing WordPress
In reply to: Search function behaving badlyI just thought that tcwa is on WP2.7… where it works
And https://ma.nutwork.com.au is on WPMU 2.7…
Maybe thats why it does work????
Forum: Fixing WordPress
In reply to: How to allow users log in and leave posts?I probably should have said that I am using buddypress and WPMU.
Since I first posted — a user can sign up and leave messages in the forum (buddypress). They can also make comments on posts (wordpress). (Annoyingly they need to log in twice, once for buddyPress and once for the wordpress – any way around this?).
Anyhow the thing I am stuck on is how to allow users to add new posts to the wordpress section – https://ma.nutwork.com.au/category/jobs/
Forum: Plugins
In reply to: HOW?? Add more “complex ” HTML to my postsWorks a charm! Cheers buddy
For those who are interested —
<?php $cat = get_query_var('cat'); $category = get_category ($cat); if ($category->cat_ID) { if($category->category_parent) $children = wp_list_categories("orderby=id&hide_empty=0&title_li=&child_of=".$category->category_parent."&echo=0"); else $children = wp_list_categories("orderby=id&hide_empty=0&title_li=&child_of=".$category->cat_ID."&echo=0"); if ($children) { ?> <?php echo $children; ?> <?php }} ?>
Forum: Themes and Templates
In reply to: how to display the sub_categories<?php wp_list_categories('child_of='.$_GET[cat].'); ?>
This works if your permalink structure is set to “default”. IT takes the category number from the web address.
Hope this helps.