sojweb
Forum Replies Created
-
Forum: Plugins
In reply to: remove posting abilityBeat me to it π
Forum: Plugins
In reply to: Some code pointers neededIt’s in
wp-includes/query.phpon lines 1739-1762:// If a search pattern is specified, load the posts that match if ( !empty($q['s']) ) { // added slashes screw with quote grouping when done early, so done later $q['s'] = stripslashes($q['s']); if ( !empty($q['sentence']) ) { $q['search_terms'] = array($q['s']); } else { preg_match_all('/".*?("|$)|((?<=[\\s",+])|^)[^\\s",+]+/', $q['s'], $matches); $q['search_terms'] = array_map(create_function('$a', 'return trim($a, "\\"\'\\n\\r ");'), $matches[0]); } $n = !empty($q['exact']) ? '' : '%'; $searchand = ''; foreach( (array) $q['search_terms'] as $term) { $term = addslashes_gpc($term); $search .= "{$searchand}(($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}'))"; $searchand = ' AND '; } $term = $wpdb->escape($q['s']); if (empty($q['sentence']) && count($q['search_terms']) > 1 && $q['search_terms'][0] != $q['s'] ) $search .= " OR ($wpdb->posts.post_title LIKE '{$n}{$term}{$n}') OR ($wpdb->posts.post_content LIKE '{$n}{$term}{$n}')"; if ( !empty($search) ) $search = " AND ({$search}) "; }I think, though, you’d be better off using a filter or something.
Forum: Fixing WordPress
In reply to: header.phpOkay, just be careful to make sure that the brackets align.
Forum: Fixing WordPress
In reply to: header.phpThe quick way around the problem would be to just test that those variables are arrays before they’re used like that:
if(is_array($cp_categories)) { foreach ( $cp_categories as $b ) { // ...code here... } }if(is_array($postcat)) { $postcat = array_slice($postcat, 0, 5); }if(is_array($postcat)) { foreach ($postcat as $cp_pC ) { ?> ...code here... }However, that’s just a workaround, better would be to rewrite the code elsewhere to ensure that those variables are always arrays.
Forum: Fixing WordPress
In reply to: header.phpNo, I mean the code from lines 309 to 316 in
header.phpthat are causing the problem.Forum: Fixing WordPress
In reply to: SE – Indexing the ‘Invisible’ Web, How?If you put the information on your site somewhere and link to it, it will be indexed, assuming it’s not blocked by a
robots.txtfile,metatag, orrel=nofollowattribute in the link.Consider putting up a pre-filtered page, maybe one with a complete list of the information.
Forum: Fixing WordPress
In reply to: header.phpCan you find the offending code and post here to look at?
Forum: Fixing WordPress
In reply to: This is a new one…That’s almost certainly a theme or plugin problem; it’s the closing tag for PHP code. Probably there is a syntax error somewhere in the theme or plugin files. Ideally you should be able to see any error logs that PHP generates that would help you pinpoint the problem. Failing that, you’d just have to play with the code to see if you can find it.
If you made any changes recently, undo them to see if the problem goes away.
Forum: Fixing WordPress
In reply to: How to? – redirect a page to a page outside WPI have a plugin that does just that: http://wordpress.org/extend/plugins/soj-page-link/
I just uploaded it, so you might have to check back later to see when the page actually gets updated. If you give me an e-mail address, I can send it to you.
Forum: Plugins
In reply to: Slideshow from WP UploadsI’m not terribly familiar with any, but maybe there’s something here that can help: http://lorelle.wordpress.com/2007/02/07/wordpress-plugins-for-images-photographs-and-graphics/
Forum: Plugins
In reply to: Slideshow from WP UploadsDoing slideshows directly from the uploads folder is a bit tricky. You might think about using Soundslides, which creates flash-based slideshows. Then you can upload the presentation with something like this http://wordpress.org/extend/plugins/soj-soundslides/.
Forum: Plugins
In reply to: wordpress and excelThere’s no simple way to do this; WordPress wasn’t built to be a file manager. While you can protect posts and pages, once a file is uploaded, it’s public. The user only needs to know the path to be able to get it. If you only have simple spreadsheet needs, you might checkout http://docs.google.com/. There, you can set up different spreadsheets and manage who has access to what.
Forum: Fixing WordPress
In reply to: .htaccess prevents index viewThis may or may not be related, but why do you have your RewriteBase set to /wordpress/?
Forum: Plugins
In reply to: HTML-Tags in the_title repeated in title attribute of <a>-linkthe_title(), by default, echoes, and doesn’t return, the title text. Forstrip_tags()to work, it has to return the string. Try this:<?php echo strip_tags(the_title('','',FALSE)); ?>However, WordPress provides a function just for what you’re doing:
the_title_attribute()Reference:
http://codex.wordpress.org/Template_Tags/the_title_attribute
http://codex.wordpress.org/Template_Tags/the_titleForum: Fixing WordPress
In reply to: how can I get text from post without ImagesPHP has a
strip_tags()function that will remove all HTML and PHP tags from a string of text.