tbrams
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress 2.7 wp_list_pages Exclude Broken?Tried to follow the guide as documented in Reporting Bugs, submitted a TRAC (!) ticket, assigned it to myself, created a patch file with this fix and marked the ticket “has_patch” and finally changed status to Fixed.
Hope somebody will review and approve soon ??
Cheers
Torben BramsForum: Fixing WordPress
In reply to: WordPress 2.7 wp_list_pages Exclude Broken?In
includes/post.php
you will find the following chunk of code beginning in line 2190 :(At least in WordPress version 2.7.1 you will – line numbers may vary for other versions)
if ( !empty($exclude_tree) ) {
$exclude = array();$exclude = (int) $exclude_tree;
$children = get_page_children($exclude, $pages);
$excludes = array();
foreach ( $children as $child )
$excludes[] = $child->ID;
$excludes[] = $exclude;
$total = count($pages);
for ( $i = 0; $i < $total; $i++ ) {
if ( in_array($pages[$i]->ID, $excludes) )
unset($pages[$i]);
}
}The problem is that the exclude_tree argument is not handled like a list of parameters, but merely as a single integer argument. I learned this after trying to build a menu for ttu.no by excluding a number of chapters, that should not go on the front page. Well, I got a nice surprise when even my elaborate exclude list only worked on the first section and my menu totally filled the front page.
But I found the problem, and have a solution – by updating the code as below, everything will work as expected:
if ( !empty($exclude_tree) ) {
$exclude = array();$exclude = explode(‘,’,$exclude_tree);
foreach ($exclude as $exclude_page) {
$children = get_page_children($exclude_page, $pages);
$excludes = array();
foreach ( $children as $child )
$excludes[] = $child->ID;
$excludes[] = $exclude_page;
$total = count($pages);
for ( $i = 0; $i < $total; $i++ ) {
if ( in_array($pages[$i]->ID, $excludes) )
unset($pages[$i]);
}
}
}Now, this is my first “real” contribution to the open source world – I wish I knew how to use TRAQ, so I could fix this directly in the repository as well ??
Please send me a pointer if you know how to work with the TRAQ system.
Kind regards
Torben BramsForum: Fixing WordPress
In reply to: Trying to install phpbb3 with wordpressNot sure if you have discovered this yet, but as I started looking at phpBB3 myself yesterday, I had the same problem until after running the install script with a fully qualified url: https://www.websitename.com/phpbb/install.php
Remember that after configuring everything during the next few pages, you will have to remove the install directory as well. That is delete the https://www.websitename.com/phpbb/install directory – otherwise you will not be able to see anything other than the phpBB admin interface.
Hope this helps – there is a lot of very qualified support info on the phpBB pages if you need more ??
Forum: Plugins
In reply to: PHPBB3 recent comments/posts in the sidebarJust tried it. This works out of the box – thanks to cogo
Forum: Installing WordPress
In reply to: Listing Children?If I understand this one correctly, I think I might have something you can use.
Have a look here: https://brams.dk/technotes/wordpress/my-first-plugin/
I used it to list related pages in the margin, but you can put it to use anywhere on your pages.
Hope this helps
Kind regards
TorbenForum: Themes and Templates
In reply to: 1 Category Template for the Parent and Child categories?I am not sure if this is what you are looking for, but I built a similar system for my static pages some time ago.
See this link: <https://brams.dk/technotes/wordpress/my-first-plugin/> – you should find explanation in the php file as well.
Kind regards
Torben BramsForum: Themes and Templates
In reply to: Customized login pageI don’t know it this will help, but I have documented how I managed this in an article here:
https://brams.dk/2005/05/18/building-a-member-site/
Works just fine – especially when combined with a customized fronpage on the admin interface.
Forum: Fixing WordPress
In reply to: change login redirectI have done this for my local Taekwondo Club website. It’s really not a lot you will have to do and I have tried to be very specific documenting.
See the step by step instruction at :
https://brams.dk/2005/05/18/building-a-member-site/
Hope this is useful.
Forum: Plugins
In reply to: Incompatable 1.51. Plugin’s Listwp-useronline is using get_onlineuserinfo() and causing trouble.
More background here: https://brams.dk/wordpress/2005/05/09/wordpress-151-upgrade/
Forum: Fixing WordPress
In reply to: Upgrade 1.5 > 1.5.1After disabling the troublesome plugin that was calling get_currentuserinfo() the upgrade went just fine.
Looks great – thanks for all the hard work and for making sure that you reminded all of us to back up the existing tables as step 1 in the upgrade guide
??
Forum: Fixing WordPress
In reply to: Upgrade 1.5 > 1.5.1I am confident that there is a severe compatibility problem with the wp_list_user plugin. I have rolled back to 1.5 to disable this and attempt to upgrade again.
Sorry for the panic – it’s not the kind of surprise I was expecting just before going to bed (It’s 2 mins past midnight here in Denmark).
Forum: Fixing WordPress
In reply to: Upgrade 1.5 > 1.5.1Sh*t!
My website just doesn’t work anymore after the upgrade. I cannot even login to the admin part. It looked so promising, but there must have been some compatability issue with wp_users_online that I used.
That is probably the most disappointing upgrade I have ever made.
The error message is:
Fatal error: Call to undefined function: get_currentuserinfo() in /customers/brams.dk/brams.dk/httpd.www/wordpress/wp-blog-header.php on line 169
Let me know if there is anything I can do to avoid starting from scratch again.
Forum: Plugins
In reply to: is_child() functionality?I have made a small plugin recently that works for me re this functionality that I hope you can use.
It’s available here:
Forum: Plugins
In reply to: Autolink (Markdown) doesn’t work as expectedHi MichelFortin,
I just tried deslecting the option as you suggested, and it works like a dream.
Thanks for pointing me in that direction ??
Forum: Plugins
In reply to: Autolink (Markdown) doesn’t work as expectedI am familiar with the syntax above, but really lazy. And now that a nice shorthand for writing a clickable email address in Markdown exist, I really want to use it. This is the feature called called “Autolink”.
If you type <[email protected]> it will be translated to the line you typed out for me above – except it is clever enough to encode the entire mailto address in an attempt to block address harvesting.
Nice and fast – I really like it. And it works if you call it directly in a php script, but in the edit panel inside wp, this exact feature unfortunately fails.
but thanks anyway.