ColdForged
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: I can’t get to pages in the Admin that use Dir/file.phpAlso, pardon my ignorance but you what dyou mean dump the page_hook?
Yup, precisely.
Forum: Themes and Templates
In reply to: Ohhh those #fff color codes.Not sure precisely what you’re asking, but if you want to know how to convert #XYZ into a 6 hex color, simply double each character into #XXYYZZ.
Forum: Fixing WordPress
In reply to: I can’t get to pages in the Admin that use Dir/file.phpHow about the “subscribe-to-comments” one, since that one isn’t a subdirectory (and, I have it installed in my installation :])? What might also be useful would be dumping the page_hook calculated from within the
add_menu_page()function to compare it.Forum: Requests and Feedback
In reply to: Preview post?Sounds good, man, code it on up! 😉
I would think it wouldn’t be overly hard to include the template’s CSS and have the preview wrap it in the appropriate
divs. The problem with making it a plugin is that with all the myriad themes available with differing layouts it’s almost impossible to have a “one-plugin-fits-all” solution.Forum: Fixing WordPress
In reply to: how to relate images to postings in wp? (php/mysql)I think he has some external database of pictures (links to pictures? Pictures as binary data?) and wants to have some way to link that database with WordPress posts, but I could be wrong. In any case, there’s no easy way to do what I just described.
Forum: Themes and Templates
In reply to: templates and index outside of WP folderNot sure what you’re asking or what you’re trying to do. Perhaps elaborate a bit?
I have my index.php outside of the wp folder and theme folder.
Which index.php and why is it located there?
Now I guess I can’t keep the index in the themes folder
Why can’t you keep it and what is your overall goal?
or is there another way to do this?
To do what?
Forum: Plugins
In reply to: Setting a cookie in headerNo problem, glad you got it working.
Forum: Fixing WordPress
In reply to: Plugin Options not working as intendedWordPress 1.5 Strayhorn has some pretty nasty problems dealing with plugins and the menus they add. The upcoming 1.5.1 release handles them better. Unfortunately, you’ll have to wait for a 1.5.1 release — or, if you’re brave and relatively knowledgeable, you can run one of the 1.5.1 nightlies — to get some relief.
Forum: Fixing WordPress
In reply to: I can’t get to pages in the Admin that use Dir/file.phpErm. Only way to tell for sure would be to download Strayhorn and diff it against your installation.
Forum: Plugins
In reply to: Setting a cookie in headerAlmost. The only problem with the logic is testing if the cookie is set. During the entire first invocation of that page when you do your
setcookie()when$_GET['set']is set the cookie doesn’t exist in the$_COOKIEarray. Only when the page next loads is the cookie available there. So, something like this:if (isset($_GET['set'])){
setcookie ('sitestyle', $_GET['set'], time()+31536000, '/', 'localhost', '0');
$sitestyle = $_GET['set'];
}
else if (isset($_COOKIE['sitestyle'])) {
$sitestyle=$_COOKIE['sitestyle']
} else {
setcookie ('sitestyle', 'beach-green-small', time()+31536000, '/', 'localhost', '0');
$sitestyle = 'beach-green-small';
}May not be optimal, but that’s the kind of logic needed.
Forum: Fixing WordPress
In reply to: I can’t get to pages in the Admin that use Dir/file.phpI’m at a loss. If you know PHP this may be the time to start narrowing it down with
echocalls to print out important stuff in theadmin.phpfile. Figure out which path it’s heading down in the part that says// Handle plugin admin pages.
if (isset($_GET['page'])) {by echoing the
$page_hookvariable and such. Goofy indeed.Forum: Requests and Feedback
In reply to: A better search?Thanks, Michael, let us know when it’s ready :D.
Forum: Plugins
In reply to: Setting a cookie in headerAnd a case for when it isn’t set. Because if it ain’t set then calling
setcookie()with an empty value parameter deletes the cookie :).Forum: Fixing WordPress
In reply to: I can’t get to pages in the Admin that use Dir/file.phpIn what way? It does the same thing?
Forum: Fixing WordPress
In reply to: I can’t get to pages in the Admin that use Dir/file.phpSave a copy of your
wp-admin/admin-functions.phpfile and edit it. Replace theadd_menu_page()function with this version and see if it helps:function add_menu_page($page_title, $menu_title, $access_level, $file, $function = '') {
global $menu, $admin_page_hooks;
$file = plugin_basename($file);
$menu[] = array($menu_title, $access_level, $file, $page_title);
$admin_page_hooks[$file] = sanitize_title($menu_title);
$hookname = get_plugin_page_hookname($file, '');
if ( !empty($function) && !empty($hookname) )
add_action($hookname, $function);
return $hookname;
}