Media Center

Started by JayBachatero, December 02, 2006, 12:43:49 AM

Previous topic - Next topic

HRM

Quote from: adynis on December 11, 2006, 06:57:32 PM
This is too much for me :(
Then I went again in Media Center, the same page to see if the thumbnail (that was just created in the thread page) appears ... but there is no difference ...

Just refresh the page, the thumb should appear then.
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

Tanks

CTRL + F5 = The right way to refresh  ;)

JayBachatero

Wow lots of problems here :(.  dakotaroar was right all along.  Well for the most part.  If there is no thumbnail created SMF will try to create the thumb when you look at the topic.  That is why then you refreshed it worked.  I did place a prevention against this but it seems like it's not working.  Can you guys add $db_show_debug = true; to Settings.php.  That will show the queries that are running.  Copy and paste the one for the media center.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

JayBachatero

Ummm I'm going to have to rethink this again.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

dakotaroar

Could you write some part that fake-looks at each of the threads with attachments?  It would be sort of a spider that just opens and shuts each thread, which would fake SMF into thinking that it had to make up a thumbnail.  You could format it as a "Force Create Thumbnails" button in the Admin panel.
The only forum for students in North and South Dakota!  Campus Dakota.

JayBachatero

No I wouldn't do that.  It would put too much load on the server.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

dakotaroar

Darn.  That would have been the blunt force method.

So there must be a line in the database that connects an attachment to its thumbnail (or a post to its attachment and thumbnail), that you could query to see if it was empty?
The only forum for students in North and South Dakota!  Campus Dakota.

HRM

#107
Quote from: JayBachatero on December 12, 2006, 12:55:26 PM
  Can you guys add $db_show_debug = true; to Settings.php.  That will show the queries that are running.  Copy and paste the one for the media center.

Quote from: JayBachatero on December 12, 2006, 03:09:50 PM
Ummm I'm going to have to rethink this again.

Done.
A bit late but still. ;D

This was page 5 when still not totally working.

http://www.muziek4um.nl/index.php?action=mediacenter

Templates: 3: index (babylon), TPortalBlocks (default), MediaCenter (babylon).
Sub templates: 4: init, main_above, images, main_below.
Language files: 4: index.english (default), Modifications.english (default), TPortal.english (default), MediaCenter.english (default).
Files included: 11 - 498KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/TPortal.php, ./SSI.php, ./Sources/TPmodules.php, ./Sources/MediaCenter.php)
Queries used: 18.

         SELECT variable, value
         FROM yabbse_settings
   which took 0.00173306 seconds.

            SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType
            FROM yabbse_members AS mem
               LEFT JOIN yabbse_attachments AS a ON (a.ID_MEMBER = 1)
            WHERE mem.ID_MEMBER = 1
            LIMIT 1
   in /home/muziek4um.nl/www/Sources/Load.php line 390, which took 0.00093293 seconds.

         SELECT variable, value, ID_MEMBER, ID_THEME
         FROM yabbse_themes
         WHERE ID_MEMBER IN (-1, 0, 1)
            AND ID_THEME IN (20, 1)
   in /home/muziek4um.nl/www/Sources/Load.php line 1169, which took 0.00055385 seconds.

SELECT name,value FROM yabbse_tp_settings
   in /home/muziek4um.nl/www/Sources/TPortal.php line 110, which took 0.00050282 seconds.

SELECT grp.onlineColor FROM (yabbse_members as m, yabbse_membergroups as grp)
         WHERE m.ID_GROUP=grp.ID_GROUP
         AND ID_MEMBER=1 LIMIT 1
   in /home/muziek4um.nl/www/Sources/TPortal.php line 150, which took 0.00022411 seconds.

SELECT count(*) FROM yabbse_tp_variables WHERE type='art_not_approved'
   in /home/muziek4um.nl/www/Sources/TPortal.php line 208, which took 0.00019503 seconds.

SELECT count(*) FROM yabbse_tp_variables WHERE type='dl_not_approved'
   in /home/muziek4um.nl/www/Sources/TPortal.php line 219, which took 0.00019908 seconds.

SELECT * FROM yabbse_tp_blocks WHERE off=0 ORDER BY bar,pos,id ASC
   in /home/muziek4um.nl/www/Sources/TPortal.php line 250, which took 0.00163698 seconds.

SELECT value, item FROM yabbse_tp_data WHERE type=0 AND ID_MEMBER=1
   in /home/muziek4um.nl/www/Sources/TPortal.php line 506, which took 0.00023317 seconds.

SELECT type,value, item FROM yabbse_tp_data WHERE type=2 AND ID_MEMBER=1
   in /home/muziek4um.nl/www/Sources/TPortal.php line 516, which took 0.0002141 seconds.

SELECT * FROM yabbse_tp_variables WHERE type='category' ORDER BY value1 ASC
   in /home/muziek4um.nl/www/Sources/TPortal.php line 614, which took 0.00029492 seconds.

SELECT * FROM yabbse_tp_variables WHERE type='menubox' ORDER BY value5 ASC
   in /home/muziek4um.nl/www/Sources/TPortal.php line 633, which took 0.00043607 seconds.

         SELECT COUNT(*)
         FROM (yabbse_attachments AS att, yabbse_boards AS b, yabbse_messages AS m)
         WHERE m.ID_BOARD = b.ID_BOARD
            AND att.ID_MSG = m.ID_MSG
            AND 1
            AND (RIGHT(att.filename, 3) = 'png' OR RIGHT(att.filename, 3) = 'jpeg' OR RIGHT(att.filename, 3) = 'jpg' OR RIGHT(att.filename, 3) = 'gif' OR RIGHT(att.filename, 4) = 'jpeg')
            AND 1
            AND 1
   in /home/muziek4um.nl/www/Sources/MediaCenter.php line 282, which took 0.0019331 seconds.

         SELECT att.ID_ATTACH
         FROM (yabbse_attachments AS att, yabbse_messages AS m, yabbse_boards AS b)
         WHERE att.ID_MSG = m.ID_MSG
            AND b.ID_BOARD = m.ID_BOARD
            AND (RIGHT(att.filename, 3) = 'png' OR RIGHT(att.filename, 3) = 'jpeg' OR RIGHT(att.filename, 3) = 'jpg' OR RIGHT(att.filename, 3) = 'gif' OR RIGHT(att.filename, 4) = 'jpeg')
            AND 1
            AND 1
            AND 1
         ORDER BY att.filename DESC
         LIMIT 0, 27
   in /home/muziek4um.nl/www/Sources/MediaCenter.php line 339, which took 0.00370407 seconds.

      SELECT
         att.ID_ATTACH, att.ID_MSG, att.filename, IFNULL(att.size, 0) AS filesize, att.downloads, mem.ID_MEMBER,
         IFNULL(mem.realName, m.posterName) AS posterName, m.ID_TOPIC, m.subject, t.ID_BOARD, m.posterTime,
         att.width, att.height, IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.width AS thumb_width, thumb.height AS thumb_height
      FROM (yabbse_attachments AS att, yabbse_messages AS m, yabbse_topics AS t)
         LEFT JOIN yabbse_members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
         LEFT JOIN yabbse_attachments AS thumb ON (thumb.ID_ATTACH = att.ID_THUMB)
      WHERE att.ID_ATTACH IN (70,51,100,143,187,87,362,199,69,230,241,120,151,14,297,8,91,158,157,156,134,364,201,263,48,165,202)
         AND t.ID_TOPIC = m.ID_TOPIC
         AND att.ID_MSG = m.ID_MSG
      ORDER BY att.filename DESC
   in /home/muziek4um.nl/www/Sources/MediaCenter.php line 367, which took 0.00226903 seconds.

      UPDATE yabbse_log_activity
      SET
         hits = hits + 1
      WHERE date = '2006-12-12'
      LIMIT 1
   in /home/muziek4um.nl/www/Sources/Subs.php line 2990, which took 0.00033402 seconds.

               SELECT code, filename, description
               FROM yabbse_smileys
   in /home/muziek4um.nl/www/Sources/Subs.php line 2486, which took 0.00057817 seconds.

      SELECT
         m.posterTime, ms.subject, m.ID_TOPIC, m.ID_MEMBER, m.ID_MSG, b.ID_BOARD, b.name AS bName,
         IFNULL(mem.realName, m.posterName) AS posterName,
         IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, 0)) >= m.ID_MSG_MODIFIED AS isRead,
         IFNULL(lt.ID_MSG, IFNULL(lmr.ID_MSG, -1)) + 1 AS new_from, LEFT(m.body, 384) AS body, m.smileysEnabled, m.icon
      FROM (yabbse_messages AS m, yabbse_topics AS t, yabbse_boards AS b, yabbse_messages AS ms)
         LEFT JOIN yabbse_members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
         LEFT JOIN yabbse_log_topics AS lt ON (lt.ID_TOPIC = t.ID_TOPIC AND lt.ID_MEMBER = 1)
         LEFT JOIN yabbse_log_mark_read AS lmr ON (lmr.ID_BOARD = b.ID_BOARD AND lmr.ID_MEMBER = 1)
      WHERE t.ID_LAST_MSG >= 10591
         AND t.ID_LAST_MSG = m.ID_MSG
         AND b.ID_BOARD = t.ID_BOARD
         AND b.ID_BOARD NOT IN (97)
         AND 1
         AND ms.ID_MSG = t.ID_FIRST_MSG
      ORDER BY t.ID_LAST_MSG DESC
      LIMIT 10
   in /home/muziek4um.nl/www/SSI.php line 352, which took 0.00107622
To install something for the cat's 'cut' is never nice..... (old dutch saying) :D

JayBachatero

Thanks HRM but I'm able to see ALL of the images on your site also.  Can you grab the query when you have broken images?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

dakotaroar

I think he'll have to turn off thumbnails, upload some more images, and then turn thumbnails on again.

(I realize I'm not much help, but I like shouting from the sideline while I wait for someone to help me with my sorting problems :D)
The only forum for students in North and South Dakota!  Campus Dakota.

JayBachatero

Actually you have helped a whole lot dakotaroar.  I appreciate everyones feedback :).
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

adynis

"upgrade"...  from vBulletin to SMF because SMF is FREE :D

http://forum.liceulcervantes.ro/index.php?action=mediacenter;sa=images [nofollow]
A lots of F5 and ctrl+F5 but nothing.


If I put  $db_show_debug = true;in settings.php, what i have to copy and paste to u ?

JayBachatero

At the bottom it will show you the queries that are running.  You paste that.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

JayBachatero

Ok forget it.  It's the same problem that I had solved before.  I'll have to make some changes.  I'll try to have something working tomorrow.  Kinda busy tonight.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

adynis

I think this is it .. :-?


Templates: 2: index (default), MediaCenter (default).
Sub templates: 4: init, main_above, images, main_below.
Language files: 3: index.romana-diacritice (default), Modifications.romana-diacritice (default), MediaCenter.romana-diacritice (default).
Files included: 8 - 337KB. (show./index.php, ./Settings.php, ./Sources/QueryString.php, ./Sources/Subs.php, ./Sources/Errors.php, ./Sources/Load.php, ./Sources/Security.php, ./Sources/MediaCenter.php)
Queries used: 10.

        SELECT variable, value
        FROM smf_settings
  which took 0.00054002 seconds.

     SELECT data
     FROM smf_sessions
     WHERE session_id = 'a7b004601f394d7ff590fd923ee03825'
     LIMIT 1
  in /home/adynis/public_html/forum/Sources/Load.php line 1997, which took 0.00101686 seconds.

           SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType
           FROM smf_members AS mem
              LEFT JOIN smf_attachments AS a ON (a.ID_MEMBER = 1)
           WHERE mem.ID_MEMBER = 1
           LIMIT 1
  in /home/adynis/public_html/forum/Sources/Load.php line 390, which took 0.00091004 seconds.

        SELECT variable, value, ID_MEMBER, ID_THEME
        FROM smf_themes
        WHERE ID_MEMBER IN (-1, 0, 1)
           AND ID_THEME = 1
  in /home/adynis/public_html/forum/Sources/Load.php line 1176, which took 0.000278 seconds.

        SELECT COUNT(*)
        FROM (smf_attachments AS att, smf_boards AS b, smf_messages AS m)
        WHERE m.ID_BOARD = b.ID_BOARD
           AND att.ID_MSG = m.ID_MSG
           AND 1
           AND (RIGHT(att.filename, 3) = 'png' OR RIGHT(att.filename, 3) = 'jpeg' OR RIGHT(att.filename, 3) = 'jpg' OR RIGHT(att.filename, 3) = 'gif' OR RIGHT(att.filename, 4) = 'jpeg')
           AND 1
  in /home/adynis/public_html/forum/Sources/MediaCenter.php line 227, which took 0.05045295 seconds.

        SELECT att.ID_ATTACH
        FROM (smf_attachments AS att, smf_messages AS m, smf_boards AS b)
        WHERE att.ID_MSG = m.ID_MSG
           AND b.ID_BOARD = m.ID_BOARD
           AND (RIGHT(att.filename, 3) = 'png' OR RIGHT(att.filename, 3) = 'jpeg' OR RIGHT(att.filename, 3) = 'jpg' OR RIGHT(att.filename, 3) = 'gif' OR RIGHT(att.filename, 4) = 'jpeg')
           AND 1
           AND 1
        ORDER BY att.filename
        LIMIT 0, 20
  in /home/adynis/public_html/forum/Sources/MediaCenter.php line 285, which took 0.0135529 seconds.

     SELECT
        att.ID_ATTACH, att.ID_MSG, att.filename, IFNULL(att.size, 0) AS filesize, att.downloads, mem.ID_MEMBER,
        IFNULL(mem.realName, m.posterName) AS posterName, m.ID_TOPIC, m.subject, t.ID_BOARD, m.posterTime,
        att.width, att.height, IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.width AS thumb_width, thumb.height AS thumb_height
     FROM (smf_attachments AS att, smf_messages AS m, smf_topics AS t)
        LEFT JOIN smf_members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
        LEFT JOIN smf_attachments AS thumb ON (thumb.ID_ATTACH = att.ID_THUMB)
     WHERE att.ID_ATTACH IN (80,81,82,83,84,205,295,69,194,118,119,139,140,282,149,117,1,20,70,208)
        AND t.ID_TOPIC = m.ID_TOPIC
        AND att.ID_MSG = m.ID_MSG
     ORDER BY att.filename
  in /home/adynis/public_html/forum/Sources/MediaCenter.php line 313, which took 0.02523398 seconds.

     UPDATE smf_log_activity
     SET
        hits = hits + 1
     WHERE date = '2006-12-13'
     LIMIT 1
  in /home/adynis/public_html/forum/Sources/Subs.php line 2878, which took 0.00059295 seconds.

              SELECT code, filename, description
              FROM smf_smileys
  in /home/adynis/public_html/forum/Sources/Subs.php line 2403, which took 0.00049901 seconds.

     INSERT INTO smf_log_errors
        (ID_MEMBER, logTime, ip, url, message, session)
     VALUES (1, 1165967362, SUBSTRING('82.76.48.110', 1, 16), SUBSTRING('?action=mediacenter;sa=images', 1, 65534), SUBSTRING('8: Use of undefined constant Webpage - assumed \'Webpage\'<br />Fişier: /home/adynis/public_html/forum/Themes/default/MediaCenter.template.php (eval?)<br />Linie: 537', 1, 65534), 'dbdb904fdd87bc787d9be379e121138d')
  which took 0.01008487 seconds.

[hide queries]

JayBachatero

Just to verify you guys are using the latest version of this mod right?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

adynis

 ;D now i'm downloading beta3a

JayBachatero

That is one of the reasons for the broken images :P.  $user_info is missing from the global scope :P.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

adynis

I've upgraded to latest version ... I don't want to be annoying but ... it doesn't show all thumbs :(
http://forum.liceulcervantes.ro/index.php?action=mediacenter;sa=images [nofollow]


SELECT variable, value
FROM smf_settings
which took 0.00053596 seconds.
SELECT data
FROM smf_sessions
WHERE session_id = '4d8eb84435352da47d4954d5efd4ca57'
LIMIT 1
in /home/adynis/public_html/forum/Sources/Load.php line 1997, which took 0.0007019 seconds.
SELECT mem.*, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType
FROM smf_members AS mem
   LEFT JOIN smf_attachments AS a ON (a.ID_MEMBER = 1)
WHERE mem.ID_MEMBER = 1
LIMIT 1
in /home/adynis/public_html/forum/Sources/Load.php line 390, which took 0.00030112 seconds.
SELECT variable, value, ID_MEMBER, ID_THEME
FROM smf_themes
WHERE ID_MEMBER IN (-1, 0, 1)
   AND ID_THEME = 1
in /home/adynis/public_html/forum/Sources/Load.php line 1176, which took 0.00021911 seconds.
SELECT COUNT(*)
FROM (smf_attachments AS att, smf_boards AS b, smf_messages AS m)
WHERE m.ID_BOARD = b.ID_BOARD
   AND att.ID_MSG = m.ID_MSG
   AND 1
   AND (RIGHT(att.filename, 3) = 'png' OR RIGHT(att.filename, 3) = 'jpeg' OR RIGHT(att.filename, 3) = 'jpg' OR RIGHT(att.filename, 3) = 'gif' OR RIGHT(att.filename, 4) = 'jpeg')
   AND 1
   AND 1
in /home/adynis/public_html/forum/Sources/MediaCenter.php line 290, which took 0.00252604 seconds.
SELECT att.ID_ATTACH
FROM (smf_attachments AS att, smf_messages AS m, smf_boards AS b)
WHERE att.ID_MSG = m.ID_MSG
   AND b.ID_BOARD = m.ID_BOARD
   AND (RIGHT(att.filename, 3) = 'png' OR RIGHT(att.filename, 3) = 'jpeg' OR RIGHT(att.filename, 3) = 'jpg' OR RIGHT(att.filename, 3) = 'gif' OR RIGHT(att.filename, 4) = 'jpeg')
   AND 1
   AND 1
   AND 1
ORDER BY att.filename
LIMIT 0, 20
in /home/adynis/public_html/forum/Sources/MediaCenter.php line 347, which took 0.00251007 seconds.
SELECT
   att.ID_ATTACH, att.ID_MSG, att.filename, IFNULL(att.size, 0) AS filesize, att.downloads, mem.ID_MEMBER,
   IFNULL(mem.realName, m.posterName) AS posterName, m.ID_TOPIC, m.subject, t.ID_BOARD, m.posterTime,
   att.width, att.height, IFNULL(thumb.ID_ATTACH, 0) AS ID_THUMB, thumb.width AS thumb_width, thumb.height AS thumb_height
FROM (smf_attachments AS att, smf_messages AS m, smf_topics AS t)
   LEFT JOIN smf_members AS mem ON (mem.ID_MEMBER = m.ID_MEMBER)
   LEFT JOIN smf_attachments AS thumb ON (thumb.ID_ATTACH = att.ID_THUMB)
WHERE att.ID_ATTACH IN (80,81,82,83,84,205,295,69,194,118,119,139,140,282,149,117,1,20,70,208)
   AND t.ID_TOPIC = m.ID_TOPIC
   AND att.ID_MSG = m.ID_MSG
ORDER BY att.filename
in /home/adynis/public_html/forum/Sources/MediaCenter.php line 375, which took 0.00206494 seconds.
UPDATE smf_log_activity
SET
   hits = hits + 1
WHERE date = '2006-12-13'
LIMIT 1
in /home/adynis/public_html/forum/Sources/Subs.php line 2878, which took 0.00053787 seconds.
SELECT code, filename, description
FROM smf_smileys
in /home/adynis/public_html/forum/Sources/Subs.php line 2403, which took 0.00050402 seconds.

JayBachatero

Ok I think it's working like it should.  It shows this image if there isn't a preview
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Advertisement: