banesto
Forum Replies Created
-
Forum: Plugins
In reply to: [Plugin: User Photo] Can’t see photos properly in users.phpBIG Thanks to 9steps!
Forum: Fixing WordPress
In reply to: Displaying Text based on Parent Page’s Name/Slugi think it’s easiest way to get parent’s slug, if that’s the case here.
# current page slug $slug = $post->post_name; # get parent page's slug $post_data = get_post($post->post_parent); $slug = $post_data->post_name;
Forum: Fixing WordPress
In reply to: drupal book modulehi!
wondering about the same issue. it’s important to decide what is important to you – each book page to be a separate entity or not?
here are my thoughts:
1) you can treat each drupal book page as a wordpress page. you can make page hierarchy like the one in drupal
2) you can make each drupal book chapter into a page, deviding it to blocks. as a result you would get less entity count and more organized structure
3) if you add pages on a daily basis and it’s a relevant part of you website, then you can make a new category “books” and a sub-cateogry for each specific book and add posts as a pages or chaptersForum: Themes and Templates
In reply to: Date Outside the Loop?display date outside the loop using wordpress defined language:
$my_date = date(‘Y-m-d H:i:s’); // format in which date/time is stored in the wp database
echo mysql2date(‘l, j. F, Y’, $my_date);possible solution would have been an ability to put something like
[code=php]
in visual editor and plugin would parse it as necessary.and, if you have wp-print installed – it kinda breaks whole concept, because, if i have in [pre] html, wp-print module executes it instead of showing the code.
Forum: Fixing WordPress
In reply to: [Plugin: WordPress Download Monitor] download details in sidebarok, i figured it out:
<?php if (is_single() || is_page()) { if (intval(get_post_meta($post->ID, 'Download', true)) > 0) { $download_section = wp_dlm_parse_downloads('[download#'.get_post_meta($post->ID, 'Download', true).']', 2); ?> <li> <ul> <?php echo $download_section; ?> </ul> </li> <?php } } ?>
i altered function wp_dlm_parse_downloads so that i can assign other format than the default one
Forum: Fixing WordPress
In reply to: Dashboard widget css problemas it seems, css for recent_drafts is hardcoded in dashboard.css, so i had to clone these styles to all my additional widgets. not too practical though.
Forum: Plugins
In reply to: Auto change user rolesi figured it out – actually it’s quite simple:
$user = new WP_User($userid); $user->set_role("subscriber");
that’s it – just write the appropriate plugin function to manage user roles.
Forum: Plugins
In reply to: Auto change user rolesi’m really interested in this feature also.