3stripe
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Include contents of child pages on static page?Aha! Just tried the ShowChildPages plugin from http://www.chromecow.com/downloads/wordpress-plugins and I’m nearly there… just need to modify to include the custom field as well now…
Forum: Plugins
In reply to: flash front-end for wordpressNice. Will check this out at work tomorrow 🙂
Forum: Themes and Templates
In reply to: Listing Pages In Custom Navigation without “List”s?No worries 🙂
Yeah, it’s always good to post your solutions, even if it just means that other folks can see what you ended up doing!
Forum: Themes and Templates
In reply to: Listing Pages In Custom Navigation without “List”s?“Now how can I do a separate list that lists only the top navigation?”
You need to use wp_list_pages again, but with the depth parameter set to ‘1’ so it only shows the main pages… (http://codex.wordpress.org/Template_Tags/wp_list_pages)
The margin on the left… you could try something like:
#navmenu ul {
list-style: none;
text-indent: 0;
padding: 0;
margin: 0;
}Forum: Plugins
In reply to: Forum Integration with WordPressI’d wait for Vanilla. It’s going to be massive when it comes out 🙂
Forum: Themes and Templates
In reply to: Listing Pages In Custom Navigation without “List”s?This is what I use for my sub navigation:
<?php /* Creates a menu for pages beneath the level of the current page */
if (is_page() and ($notfound != '1')) {
$current_page = $post->ID;
while($current_page) {
$page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
$current_page = $page_query->post_parent;
}
$parent_id = $page_query->ID;
$parent_title = $page_query->post_title;
if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) { ?>
<ul>
/* Remove the next line if you don't want to show the parent page
<li><a href="<?php echo get_permalink($parent_id); ?>"><?php echo $parent_title; ?></a></li>
<?php wp_list_pages('depth=1&sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
</ul>
<?php } } ?>Forum: Themes and Templates
In reply to: Listing Pages In Custom Navigation without “List”s?That sounds complicated! Try seaching for plugins to list child pages – something like http://jaredquinn.info/software/wordpress-plugin/sublist/ should help…
Forum: Plugins
In reply to: Flash frontend.Hi guys, I’ve just launched a new forum called WordPress meets Flash, which I hope will become a specialised resource for all kinds of info on using WordPress/Flash together.
Check it out at http://wordpressmeetsflash.3stripe.net/
PS. Jimbo Ready’s site seems to be down as well??
Forum: Plugins
In reply to: Document management plugin (for PDFs etc)Can any plugin authors help me?
I have some code, which will output a list of pdfs/docs in a directory… but how can I make this a plugin that will add the resulting dropdown menu next to my quicktags?
<?
echo "<form>";
//Looks into the directory and returns the files, no subdirectories
echo "<select name='yourfiles'>";
echo "<option value=''>Select document</option>";
//The path to the style directory
$dirpath = "/home/blahblahblah/media";
$dh = opendir($dirpath);
while (false !== ($file = readdir($dh))) {
//Don't list subdirectories
if (!is_dir("$dirpath/$file")) {
//Check that the file extension is .pdf or .doc
$ext = substr($file, strrpos($file, '.')); // Get the extension of the file
if ($ext == ".pdf" || $ext == ".doc") {
//Truncate the file extension and capitalize the first letter
echo "<option value='$file'>" . $file . '</option>';
}
}
}
closedir($dh);
//Close Select
echo "</select>";
echo "</form>";
?>Forum: Plugins
In reply to: Document management plugin (for PDFs etc)Well, I’m working on this myself now, using http://www.ilfilosofo.com/blog/old-style-upload/ 🙂
Forum: Plugins
In reply to: Forum Integration with WordPressShe’s a beauty of a forum I agree 🙂
If you need help, ask nicely at http://lussumo.com/community/ when version 1.0 is released in the next week or so. I’m sure someone will know what to do!
Forum: Plugins
In reply to: Forum Integration with WordPressIf you can wait about a week, there’s a real nice forum called Vanilla that should have WP integration…. check out http://getvanilla.com/ (currently offline but will be back up very soon)
Forum: Plugins
In reply to: PDF upload/link pluginHas anyone had any more luck with this?
Forum: Fixing WordPress
In reply to: Displaying sibling pages with wp_list_pages.Ok I worked this out – this is a tweaked version of the above code, which will always include the parent page at the top of the list (even if you are on that page)
<?php /* Creates a menu for pages beneath the level of the current page */
if (is_page() and ($notfound != '1')) {
$current_page = $post->ID;
while($current_page) {
$page_query = $wpdb->get_row("SELECT ID, post_title, post_status, post_parent FROM $wpdb->posts WHERE ID = '$current_page'");
$current_page = $page_query->post_parent;
}
$parent_id = $page_query->ID;
$parent_title = $page_query->post_title;
if ($wpdb->get_results("SELECT * FROM $wpdb->posts WHERE post_parent = '$parent_id' AND post_status != 'attachment'")) { ?>
<ul>
<?php ?>
<li><a href="<?php echo get_permalink($parent_id); ?>"><?php echo $parent_title; ?></a></li>
<?php ?>
<?php wp_list_pages('sort_column=menu_order&title_li=&child_of='. $parent_id); ?>
</ul>
<?php } } ?>Forum: Fixing WordPress
In reply to: Displaying sibling pages with wp_list_pages.Wow thanks Dylan, this is perfecto 🙂
One question – if I’m on a parent page, this page is not shown in the list. How could I force it to be shown?
For example, if you have ‘About’ with 2 pages below it called ‘People’ and ‘History’ – the menu on ‘About’ lists only these sub pages, and not ‘About’. When you go into ‘People’ or ‘History’, ‘About’ then shows up in the list…