Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » upm_img_popper

#157 2005-06-28 04:09:47

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: upm_img_popper

I can replicate some of those errors.

The help one was something I missed somehow, easy to fix.

The prefs errors are because of the changes to the prefs system that just happened. I don’t know how exactly I can fix them, so it may be a little before I can completely fix it.

Unfortunately, the not working for you part (“no images”) I still can’t replicate, so I only have a general direction of where to look.

Thanks for letting me know all these details, I’ll try and fix this completely as soon as I cam.

Offline

#158 2005-06-28 04:28:21

mjarecki
Member
Registered: 2005-06-17
Posts: 21

Re: upm_img_popper

Thanks Mary

Is it possible that I’m not using the required version of PHP (Using 4.3.11) , Apache (Using1.3.33 (Darwin)) or MySQL (Using 2.2.7-pl1)?

Maybe httpd.conf problem?

Or the I need to set up TXP in the root directory instead of current?

Do you think the Pre-flight check: Web Domain DNS lookup fails: 192.168.0.2 could be causing problems?

I’m clutching at straws here… Cos it seems that most other plug-ins work for me and really really want to use yours too…

Mark

Offline

#159 2005-06-28 05:08:07

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: upm_img_popper

“I’m clutching at straws here…”

I know the feeling.

PHP (Using 4.3.11) , Apache (Using1.3.33 (Darwin)) or MySQL (Using 2.2.7-pl1)…”

Well, I’m using that version of PHP and Apache, and it works fine. That sounds like your phpMyAdmin version, rather than your MySQL version. If it was a requirements problem, you’d have the built-in images tab not working too.

The strange thing is that the plugin uses an almost identical counting function as the images tab (if the count is less than one, obviously there’s nothing there), and the directory its in wouldn’t affect that. The only difference is that I’ve restricted it to only counting actual images, but not Flash files (you can upload graphic Flash files as “images” in Textpattern, but my image tag doesn’t support outputting them).

The dns thing is strange, but that shouldn’t be the problem either.

How familiar with phpMyAdmin are you? If you’re fairly competant with it, we could run a few queries on it and compare the results.

Offline

#160 2005-06-28 05:38:29

mjarecki
Member
Registered: 2005-06-17
Posts: 21

Re: upm_img_popper

I can get around the interface alright.

Incidentally I was looking at the wrong line in phpMy Admin MySql is 4.0.24-standard

What do you want me to test? What queries? Send ‘em over and I’ll see what I get.

Offline

#161 2005-06-28 18:34:48

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: upm_img_popper

Go to your Textpattern database, then to the txp_images table, then run sql. The starting sql in the textarea should be something like:
<code>SELECT * FROM `txp_image` WHERE 1</code>

If you used a prefix for your tables when you ran setup, then it will include the prefix and that’s the table name to use with the following sql:
SELECT COUNT(*) FROM tablename WHERE ext IN('.gif','.jpg','.png');

So, if you didn’t use a prefix, you’d do:
SELECT COUNT(*) FROM txp_image WHERE ext IN('.gif','.jpg','.png');

Got the idea?

It should return a number: what is that number, and how many images do you have uploaded (not counting the thumbnails, just the individual uploaded “images”).

Offline

#162 2005-06-28 20:09:04

rossharvey
Member
From: Earth. Sometimes.
Registered: 2005-03-16
Posts: 233
Website

Re: upm_img_popper

I’ve used this plugin a lot now, it’s by far the most productive addition. Once again, thanks mary for this.

Any chance of making a version that works with this:

http://emps.l-c-n.com/articles/61/Textpattern-restyled

That style is so much nicer to use than the default admin page, but this plugin didn’t show on the write page. Can’t have that :¬)

Last edited by BlueMamba (2005-06-28 22:04:27)

Offline

#163 2005-06-29 01:04:06

mjarecki
Member
Registered: 2005-06-17
Posts: 21

Re: upm_img_popper

Hi Mary

Ran the query:

SELECT COUNT FROM txp_image WHERE ext IN(‘.gif’,’.jpg’,’.png’);

Got:

Count(*) equal 1

There is 1 image in the images folder (1.jpg). (There is also 1 thumbnail 1t.jpg). This seems correct.

What next?

Problem is won’t be near a computer for the rest of the day so I won’t get back to you till tomorrow.

Thanks so much for looking into this!!!

Mark

Offline

#164 2005-06-29 02:42:36

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: upm_img_popper

Okay then we proceed with another test, whenever you have the time. “Edit” the plugin and find:
if ($total < 1)
(this is easiest to do by selecting all of the plugin, pasting it into a text editor, use the editor’s search/replace function, then paste all of it back into the textarea)

Just above that line, add in
echo 'Total images: '.$total;

Save, then open the popup again. Somewhere near the top of the page should be:
Total images: some-number

What does it say?

Offline

#165 2005-06-29 08:33:31

mjarecki
Member
Registered: 2005-06-17
Posts: 21

Re: upm_img_popper

Just did it, got:

Total images:

There was no value after it.

Incidentally, if I type <code><txp:image id=“1” /></code> into an article it does show the image. But the equivalent <code><txp:upm_image /></code> does nothing. Not really sure it should, but I just thought I’d let you know.

Last edited by mjarecki (2005-06-29 08:45:42)

Offline

#166 2005-06-29 08:38:09

mjarecki
Member
Registered: 2005-06-17
Posts: 21

Re: upm_img_popper

Another point to note is that if I hard code $total=1; The pop-up window displays most of the correct information except it displays the message:

Notice: Undefined index: insert in /Library/WebServer/Documents/current/textpattern/lib/txplib_misc.php(379) : eval()’d code on line 985

Otherwise all else seems to work properly.

Last edited by mjarecki (2005-06-29 08:41:58)

Offline

#167 2005-06-29 15:56:03

mrdale
Member
From: Walla Walla
Registered: 2004-11-19
Posts: 2,215
Website

Re: upm_img_popper

Since I svn’d the latest RC3 (354) my basic prefs panel has been reporting errors in the prefs file (line 94). Then it lists about 10 callback functions that produce errors.

The callback functions are from two plugins:

  1. upm_img_popper
  2. rss_live_archive

I’ve disabled and deleted both pugins, but the problem persists, any suggestions?

[edit] I fixed this after sencer sent me in the right direction

-Dale

Last edited by mrdale (2005-06-29 16:52:34)

Offline

#168 2005-06-29 19:30:45

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: upm_img_popper

Dale: I know. :) Any plugins that store preferences will have this problem. It needs to wait until these changes are made. So, sit tight, it will get fixed as soon as possible. :) Thanks for mentioning it.

Mark: Thats interesting. At least know we can know with certainty where it is failing. Why is still to be deteremined. For some reason, getCount is failing. Okay, back into editing the plugin:

&bull; Make sure to return the plugin back to what it was – may be easier to just uninstall and then re-install the plugin.
&bull; Then, find $total again.
&bull; Change this :
$total = getCount('txp_image', "$criteria ext in('.gif','.jpg','.png')");

to this:
$total = getCount('txp_image', "$criteria ext in('.gif','.jpg','.png')", true);

What this should do is give us any errors being encountered when the query is run. Save and open the popup and see what happens.

Offline

  1. Index
  2. » Archives
  3. » upm_img_popper

Board footer

Powered by FluxBB