Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: wlk_mp
Guys, the following is the style I threw in my stylesheet to get it to look better:
<code>
.magazine-image img
{
border: 1px solid #000;
margin: 2px;
}
</code>
If you want the whole box containing the images to have text flow around it do this:
<code>
.magazine-image
{
float: left;
}
</code>
That <code>left</code> can be a right if you so desire.
Last edited by Walker (2006-07-24 22:26:01)
Offline
#26 2006-07-24 22:31:23
- amygail
- New Member
- Registered: 2006-07-20
- Posts: 6
Re: wlk_mp
There’s another ‘duh’ for me.
Still need to tweak – but yipppe it’s gonna work.
Now – if I just had pop-ups…..
Thanks again!
a
Offline
Offline
#28 2006-07-24 22:49:55
- amygail
- New Member
- Registered: 2006-07-20
- Posts: 6
Re: wlk_mp
Mine horses barely fit in my apartment- but I’m certain the ride will be worth the struggle.
I can’t work on the site for a few anyway.
Thanks for the great plugin and help.
best
a
Offline
Re: wlk_mp
This is excellent work Walker, really. Thanks for adding the ability to use categories instead of image ID’s.
One minor, minor issue. It looks like the directory where it looks for the images is hardcoded to ‘images’, so if you change this in the textpattern admin is fails to find the images.
other than that great stuff
- Christian
Offline
#30 2006-07-29 13:00:44
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: wlk_mp
Thanks for a great plugin Walker!
I just don’t quite understand what the padding attribute does. Padding between the images has to be set in the CSS with margin
for .magazine-image img
, otherwise there will be no padding at all between the images. But the padding attribute does make a difference, if you don’t set it to a certain value the images are moved around so they’re not in a square at all anymore. What that certain value is I only found out by trial and error, I fail to see the logic behind it.
But never mind, I’m only using it on one page, and I finally managed to get that one to display all right :)
Offline
#31 2006-08-02 20:14:39
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: wlk_mp
I don’t understand. All of a sudden my page with wlk_mp on it won’t load anymore, unless I disable the plugin. It was working fine yesterday. I didn’t change anything in the article the plugin tag is in since I installed the plugin, five days ago. After that, I installed two other plugins, but disabling those doesn’t make any difference.
Can someone give me a hint where to start looking for the cause?
Offline
Re: wlk_mp
Could you go into debugging mode and give me the error output details?
Oh…..and on your padding attribute thing….the padding number is required as it is used in the calulations made when making the entirety set at a specific width.
..Although, I just checked and I’m setting a default that should take over if you don’t set anything….I’ll have to look further into this issue.
Last edited by Walker (2006-08-02 20:35:00)
Offline
#33 2006-08-02 20:52:00
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: wlk_mp
Walker wrote:
Could you go into debugging mode and give me the error output details?
Er… that was the first thing I thought of, but of course the page won’t load, so no output at all :( If I disable the plugin the error output is just that wlk_mp etc. is an unknown tag.
Oh…..and on your padding attribute thing….the padding number is required as it is used in the calulations made when making the entirety set at a specific width.
..Although, I just checked and I’m setting a default that should take over if you don’t set anything….I’ll have to look further into this issue.
Please don’t go through any trouble for this, I managed to display it right in the end. If I don’t set the padding the images don’t form a square. The only thing I found is that the padding has to be more than the margin set in the CSS, at least in my setup.
Thanks for your reply.
Edit: I just noticed that eventually the page does display, it takes at least 15 minutes or maybe more, I didn’t keep track of the time. But the images are not displayed. I’ll turn debugging mode on now. The page is here.
Last edited by els (2006-08-02 20:56:27)
Offline
#34 2006-08-02 21:08:52
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: wlk_mp
The page took 11 minutes to load and no images are displayed. Error output:
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Warning: getimagesize(http://doggiez.nl/images/35.jpg): failed to open stream: HTTP request failed! ;J on line 45
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Warning: getimagesize(http://doggiez.nl/images/38.jpg): failed to open stream: HTTP request failed! ;J on line 45
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Warning: getimagesize(http://doggiez.nl/images/36.jpg): failed to open stream: HTTP request failed! ;J on line 45
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Warning: getimagesize(http://doggiez.nl/images/39.jpg): failed to open stream: HTTP request failed! ;J on line 45
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Warning: getimagesize(http://doggiez.nl/images/37.jpg): failed to open stream: HTTP request failed! ;J on line 45
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Notice: Undefined index: format on line 207
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Notice: Undefined index: url on line 207
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Notice: Undefined index: ratio on line 207
An error occurred in the following tag: <txp:wlk_mp width="310" padding="6" images="35|38|36|39|37" alt="honden in mijn leven" /> -> Warning: array_multisort(): Argument #1 is expected to be an array or a sort flag on line 207
(Edit: in case you’re viewing the page, I disabled the plugin to make the page available for visitors again.)
Last edited by els (2006-08-03 22:01:35)
Offline
Re: wlk_mp
@Els: Did you ever get this thing working? If not, try the new version. I think I cleaned up some problems with it.
@Everyone: I have update the plugin to v0.5. Besides come cleanup and revision, This fixes a bug in specifying the image category via the tag rather than the custom_field (both work now). You can now specify the number of images to appear (when using category) by creating a custom field call “magnum” or using the attribute “number” within the tag.
I made all the paths within the plugin itself use the $GLOBALS[‘prefs’] sorry this wasn’t done sooner. (I think this is part of what was causing Els’ problem).
I looked into how to deal with the path within the image.php file that you must upload to the “files” directory. If your image directory is not at the same level as the “files” directory and the images directory is not named default, you won’t have any problems with the plugin itself, but you’ll have to go edit the image.php file so that it works correctly.
You’ll be editing line 8 where it says:
<pre><code>
$file = ‘../images/’.$_GET[‘file’];
</code></pre>
Change that path to the relative path from the image.php file to the images directory…..
So if you have a directory looking like this:
<pre>
public_html
|
__textpattern
|
__index.php
|
__randomfiles
|
__misc
|
__image.php
|
__images
</pre>
You would need to change it to look like this:
<pre><code>
$file = ‘../../images/’.$_GET[‘file’];
</code></pre>
(Notice, went from one, to two: ../../images v. ../images)
Ask if you need help.
P.S. If you are complicating your Textpattern install by renaming and changing paths and directory names….cut it out!
Last edited by Walker (2006-08-07 13:30:49)
Offline
Re: wlk_mp
Oh…..to further complicate things….I looked into the whole padding ish.
Padding now defaults to 0. Make sure that you have the stylesheet set to something like:
<pre><code>
.magazine-image img
{
margin: 0;
padding: 0;
}
</code></pre>
If you have a margin of 2 and a border of 1 around all your images (in stylesheet) set your padding value to 3.
<pre><code>
.magazine-image img
{
margin: 2;
border: 1px solid #000;
}
</code></pre>
<p><code>
<txp:wlk_mp padding=“3” />
</code></p>
This is some minor math that I just cannot do for you. The plugin uses the padding value to figure out what size to make all the images so they fit into a rectangle that is the width specified by you (or left to default to 400px).
Last edited by Walker (2006-08-07 13:40:19)
Offline