Chris Burgess
Forum Replies Created
-
Forum: Your WordPress
In reply to: WordPress for recording resolutions of committeesas you also use bbpress @ https://monarch.org.nz/forum/
https://bbpress.org/plugins/topic/bbpress-polls/
+
https://bbpress.org/plugins/topic/private-forums/might do what you’re after
Forum: Fixing WordPress
In reply to: wp-mail and wordpress 2.5I’d like to know the answer to this, but unfortunately it doesn’t look so good.
Blog by email in the WP Codex currently says that image attachments are broken in 2.5, and we will be waiting until 2.6 for this to work.
Looks like the relevant bug is #4965.
Forum: Fixing WordPress
In reply to: Addslashes/Escapefrom wp-settings.php (2.3.1)
if this is here, should $wpdb->Escape() be defanged? or do we just not need to do it on $_GET/$_POST
i didn’t like magic_quotes_gpc when it was invented, and i’m surprised to find a similar approach here ??
// If already slashed, strip. if ( get_magic_quotes_gpc() ) { $_GET = stripslashes_deep($_GET ); $_POST = stripslashes_deep($_POST ); $_COOKIE = stripslashes_deep($_COOKIE); } // Escape with wpdb. $_GET = add_magic_quotes($_GET ); $_POST = add_magic_quotes($_POST ); $_COOKIE = add_magic_quotes($_COOKIE); $_SERVER = add_magic_quotes($_SERVER);
Forum: Fixing WordPress
In reply to: Addslashes/EscapeI get the same. Sample code @ https://www.ads-software.com/support/topic/121553
Forum: Plugins
In reply to: attribute_escape() versus $wpdb->escape()Agreed. Using this function, and with magic_quotes_gpc=Off in php.ini, I see “double quoting” of “Harriet’s Adages” stored in the DB as “Harriet\’s Adages”. ???
function recordBooksWanted() { // we are logged in by now, either by magic registration or login global $current_user, $wpdb ; if ( isset($_POST['book_title']) ) { for ( $i = 0 ; $i < sizeof($_POST['book_title']) ; $i++ ) { if ( $_POST['book_title'][$i] != '' || $_POST['book_author'][$i] != '' ) { $cols['user_id'] = $current_user->ID ; if ( $_POST['book_title'][$i] != '' ) { $cols['title'] = $wpdb->Escape($_POST['book_title'][$i]) ; } if ( $_POST['book_author'][$i] != '' ) { $cols['author'] = $wpdb->Escape($_POST['book_author'][$i]) ; } $sql = 'INSERT INTO ' . $wpdb->prefix . 'books_wanted ' . '( ' . implode(',', array_keys($cols)) . ') VALUES ' . "( '" . implode("','", array_values($cols)) . "')" ; $wpdb->Query($sql); } } } }
fyi – if you recycle the DB link wordpress already has handy (hint: global $wpdb + the database functions in the codex), you won’t need to be packin the DB auth into pages separately
hth
Forum: Fixing WordPress
In reply to: allowing public to postsome boxes you might need to tick:
/wp-admin/options-general.php – “anyone can register”, “new user default role” => contributor
this will let them contribute content, but you’ll need to move the people you trust up to “editor” to let them publish their own stuff. don’t let just anyone sign up and post articles, unless you want to be minneapolis’s “Gold Medal Viagra” resource.
you may need to add a link to the login page in your theme. edit sidebar.php in your theme dir to do this, that’s where you want it to be.
have a look and see if the theme has some options (presentation menu). it may let you turn on these facilities.
Forum: Fixing WordPress
In reply to: allowing public to postwhoops, i should say “Role”, not “Permission”. edit their user accounts under the users tab.
Forum: Fixing WordPress
In reply to: allowing public to postgive your users “contributor” or “editor” permission. and/or add a link to the wp-admin/ section so they can log in and post.
as long as you keep your customisations inside the wp-content folder, they should be protected against harm for upgrades. since learning not to mess with the core files, i’ve been a happy upgrader every time, even from 1.5 to 2, 2.1, 2.2. (i look after a number of sites.)
your logo design is beautiful! i like the colours of the site too. i think that you could easily make the logo twice the size – please bust it out of that black box – and pull back the black borders, i feel they are overpowering an otherwise really lovely site look. 2c for free ??
Forum: Fixing WordPress
In reply to: wp_list_pages(‘child_of=8&title_li=’)csbarton, if you added your code blocks to a plugin file it would
1) make it easy for other users to use your code block
2) ensure you can upgrade when new releases occur without grief
Plugins Are Good ??
Forum: Themes and Templates
In reply to: Not list_pages but something like get_pages?that would be get_page_children() in 2.1 (not sure if it was in 2.0 or not)
get_page_children(ID, NULL) ;
the second argument is the pages to check to see if they have a parent with ID of ID – if you set it to something empty(), then WP will use the page cache
i have a plugin for some related stuff – xbToolkit – will upload it to https://giantrobot.co.nz/ sometime in early march – please bug me via email if i haven’t done it already
Forum: Plugins
In reply to: Delete similar postsI’ll confess my WHY: i was using mail filters, Postie (email-to-post plugin) and WP1.5 to trag jobs, then reading the RSS feed in Lilina.
And I got about 400 dupes, which I resolved with a couple of SQL queries as touched on above.
I wrote up how I did this so that others who suffered the touch of post duplication might be saved.
HOWTO remove / delete duplicate posts in wordpress 1.5
I guess I’ll have to update it for 2.0 and 2.1 now. If you modify the query for these, please paste it back here, and I can update the page.
Forum: Themes and Templates
In reply to: “On-state” for current page in navigationYes, that seems to be an issue with the static frontpage plugin (or WP, not sure which). I’ve run into it before too.
Forum: Fixing WordPress
In reply to: How to show who writes a postcorey,
in wordpress there is a distinction between the_FOO() tags and get_the_FOO() tags.
the_author() will OUTPUT the result, while get_the_author will RETURN the result.
<?
$x = the_author() ;
// prints author name, and sets $x to “true”$y = get_the_author() ;
// prints nothing, and sets $y to the author name
?>Forum: Fixing WordPress
In reply to: Custom TinyMCE / use all of tinymce optionsThanks anselm1109! That’s really helpful.
I documented how to do the font size specifically here:
https://giantrobot.co.nz/gr/2006/10/20/font-size-in-wordpress-tinymce/Cheers