m0n5t3r
Forum Replies Created
-
Forum: Plugins
In reply to: Help me find a image/gallery plugin!<shameless plug>
also check inline gallery; you can customize the output to suit your preference, and it’s rather easy to set up and get startedhttps://m0n5t3r.info/work/wordpress-plugins/inline-gallery
https://m0n5t3r.info/stuff/inline-gallery/ig_install_demo_final.swf
</shameless plug>Forum: Plugins
In reply to: Inline Gallery by m0n5t3r questionHey, I’ve got a user! ??
1. is there something like
[dir]
mysubfolder
in the desc.txt file?2. you can use
{$tag}
in the template3. is there a
<br />
in the alt text? URL, please!Forum: Fixing WordPress
In reply to: How to display codeum,
<code><pre> the_code</pre></code>
? the_code should be html escaped, ofc; or you may drop <pre> and use nl2br…Forum: Plugins
In reply to: How to exclude smileys from image count…My typo, sorry:
$imagecount -= preg_match_all('/<img[^>]+(?=(class=\'wp-smiley\'))/s', $post_content, $images);
edit: it wasn’t a typo after all, it was the forum software screwing up escaped code.Forum: Plugins
In reply to: How to exclude smileys from image count…Here you go:
$imagecount = preg_match_all('/<img/', $post_content, $images);
$imagecount -= preg_match_all('/<img[^>]+(?=(class='wp-smiley'))/s', $post_content, $images);Forum: Your WordPress
In reply to: m0n5t3r’s nestI’m glad you like it :D. Dunno if I’ll put recent posts on the home page… after all, it’s not just a blog, it aims to become a bit more in time…
you’re welcome ??
yeah, tidy is available as a pear (pecl actually) package, so if the host allows you to use dl(), which I doubt, you can load the library dynamically. All you need to do is either find the .so file compiled for the OS on the host, or grab it and compile it there (you’ll need shell access and some development tools, including the php development libraries).
If you have shell access and the needed tools, installing is as simple as
pear -v install -R some_root_dir tidy
-R is needed because you don’t have root access ??
But you will need access to the dl() function, if the host won’t install that extension for you.
More info is available at https://www.php.net/manual/en/ref.tidy.phpthe comments work, I have just tested the system… as for the plugin, check for spaces/newlines at the end of the php file, there should be none (otherwise, the headers can’t be sent).
If the php file is ok, then you may need to check if tidy really works (i.e., is the extension really loaded?), try this php code (taken from the php documentation, save it as a php file):
<?php
$html = '<HTML><HEAD></HEAD><BODY>Hello World</BODY></HTML>';
$config = array('indent'=> TRUE, 'output-xhtml' => TRUE, 'wrap' => 80);
tidy_set_encoding('UTF8');
foreach ($config as $key => $value) {
tidy_setopt($key,$value);
}
tidy_parse_string($html);
tidy_clean_repair();
echo tidy_get_output();
?>
Resultant HTML should be similar to:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="https://www.w3.org/1999/xhtml">
<head>
<title></title>
</head>
<body>
Hello World
</body>
</html>
if this works, then let me know, it would mean that there is something wrong with my code (the class version may not work with php 4, but I doubt that) and I’ll change it.Forum: Themes and Templates
In reply to: Serving up “application/xhtml xml”strange, I can’t edit my previous post… I changed the name and url of the plugin (for a better view on Google), so now it’s called content-negotiation for wordpress
Forum: Themes and Templates
In reply to: Serving up “application/xhtml xml”have a look at this, it works for me (wp 1.5).
Some of the filter hooks are not documented, I discovered this one by digging through the source files ??I have written a html tidy plugin for wordpress 1.5, it works for me, cleaning my typos and the commentors’ ones ??
I actually really need that, since I serve pages as application/xhtml+xml, and a typo could stop the whole page from displaying in Firefox, which holds more than 2/3 of my page hits.Forum: Plugins
In reply to: autogallery image plugin helpI’ve made some comments on the author’s site. Basically, $image_root is the web path to the images (i.e. for https://www.example.com/images/, $image_root is /images/) The article-id is just that, the article id (it is the first column in the list of posts on the post management page from wp-admin).
The script tries to guess the real filesystem path where the images are by appending $image_root to the document root. Depending on your configuration, this may fail (/~username setup, mod_rewrite, etc.). To fix it, all you need to do is comment out or remove the line that says
$searchdir = $_SERVER["DOCUMENT_ROOT"].$filedir;
and replace it with
$searchdir = "$searchdir/$id/";
where $searchdir is the real filesystem path where your pictures are located (like /var/www/hosts/www.example.com/pictures or /home/user/public_html/pictures).