dains
Forum Replies Created
-
Forgot to mention, the selector to Hide the username in the Profile Builder options is grayed out. From looking at the code in wppb.edit.profile.php, making that selectable would fix the problem as the code checks to see if it is set to “Show” or not.
Forum: Hacks
In reply to: Trouble passing IDs of multisite blogs to foreach loop – help please?Problem solved. You have to specify the key via ->blog_id to get the value within the loop. Updated the code for posterity.
global $wpdb;
$site_blog_ids = $wpdb->get_results($wpdb->prepare(“SELECT blog_id FROM wp_blogs where blog_id > 1”)); // get all subsite blog idsprint_r( $site_blog_ids ); // checkem – output is “Array ( [0] => stdClass Object ( [blog_id] => 2 ) [1] => stdClass Object ( [blog_id] => 3 ) [2] => stdClass Object ( [blog_id] => 5 ) ) “
foreach( $site_blog_ids AS $site_blog_id ) { //iterate through the ids
print_r( “siteid= “.$site_blog_id->blog_id.”</br>” ); // checkem – this shows no blog ids output at all ??Thank you Joy! I’ll take a look at it tomorrow (today actually arggh) and see if I can work that out. I’ll send the code your way if I have any luck.
In the plugin directory. If you used WP to automatically install it, you will need to download the plugin manually to get the sample files.
Thanks Todd. You might want to update the instructions then, I was just following the directions.
Thank you Todd! This is the ONLY plugin that gets rid of all that template and functions.php coding to put widgets in, so it’s really good to see it’s still supported. I wish it was core 🙂
Hmm it seems that passing the number instead of the name is causing the problem. I tried the name and it worked fine in all cases, but number did not work either in template tag or shortcode.
Do you see anything wrong with this?
<?php widgets_on_template('4'); ?>I’d really rather not use names because if they get changed, you have to change the code as well, whereas numbers are more-or-less static.
Ok, still getting this output:
It appears to be calling the right widget, but no output. The content is just a simple function to output something, and works fine when placed directly on the page. Any ideas?
Whoops, was I misinterpreting the instructions here?
#5 on http://wordpress.org/extend/plugins/widgets-on-pages/installation/ says use “php widgets_on_template(“wop_1″);”. I assumed that meant use “wop_+the number of the WOP widget”, which is 5 in my case.
So it will work with just the number then, or with the specific name, and passed as a string either way. I can deal with that. Thanks for the help!
Hi, I’m researching something along the same lines – show some specific blog posts from each blog in a view on the main blog. Thanks @bhenselmann for that code, looks like it will do the trick without a bunch of coding. Nice one!
Forum: Plugins
In reply to: Small question about security of $wpdb->insertWow, no response to this? It’s pretty important and I just learned it today doing testing, so I’ll answer.
wbdb bypasses the API and so it needs to have the full treatment by the coder. The coding standards here – https://codex.wordpress.org/WordPress_Coding_Standards – give you some information, plus a prep function for it. Also, the wpdb function reference gives you some more info.
Hope this helps!
Dains
Forum: Hacks
In reply to: Front end Admin PagesHad the same thought 🙂 I’ll use your WP Development form. Thanks for the offer!
Forum: Hacks
In reply to: Front end Admin PagesThat’s an excellent point about contributors and up being able to see other’s content in the Admin interface. They get the entire Posts and Pages list, don’t they.
Sure I’ll give you a link to my company site (under development still, oh well), but not on this forum. Too many spammers here and on BP.org, and I’ve already had a hack on a locked up, secured, under development Joomla site.
If you’re the UK WPsites, I can use your WP Development form to send you my info. I see a twitter WPsites too so if that’s you, I can send it that way as well.
Forum: Hacks
In reply to: Front end Admin PagesHi WPsites, using a popin of some type is an approach I’d considered. I was thinking of using the CSS override to customize the Admin interface per role, or possibly commission a project to customize the Admin interface entirely so that I could guarantee the user would only see the right controls for their needs.
But re security, doesn’t WP check permissions when you access the Admin interface, even via Jquery?
Forum: Hacks
In reply to: Front end Admin PagesHi Jazzercisin, we had to shift some features back to another phase, so I don’t have a lot of progress to report right now. Sorry!