Page 821 of 1475

Posted: Tue Dec 13, 2005 9:54 pm
by DavidIQ
mike9999 wrote: I am getting this error...

Look back a few posts and you'll have the code to fix that.

Posted: Tue Dec 13, 2005 9:56 pm
by ChickenHawk
yes i did...i'll comfirm it

Posted: Tue Dec 13, 2005 10:01 pm
by mike9999
I dont know who is talking to who or fixing what when looking back at the posts, I dont wanna hack up something thats right, these are the only errors I see on my board.\

found it.. geez all that code for this?? what does it fix aside from the errors? is there a function it makes work again. The only problem I actually have is that images dont show inline when thumbnail is selected in the admin

Posted: Tue Dec 13, 2005 10:04 pm
by DavidIQ
mike9999 wrote: I dont know who is talking to who or fixing what when looking back at the posts, I dont wanna hack up something thats right, these are the only errors I see on my board.

This is what I'm talking about:

Code: Select all

#
#----[OPEN]----
#
attach_mod/includes/functions_selects.php

#
#----[FIND]----
#
function group_select($select_name, $default_group = 0)
{
   global $db, $lang;

   $sql = 'SELECT group_id, group_name
      FROM ' . EXTENSION_GROUPS_TABLE . '
      ORDER BY group_name';

   if (!($result = $db->sql_query($sql)))
   {
      message_die(GENERAL_ERROR, "Couldn't query Extension Groups Table", "", __LINE__, __FILE__, $sql);
   }

   $group_select = '<select name="' . $select_name . '">';
   
   $group_name = $db->sql_fetchrowset($result);
   $num_rows = $db->sql_numrows($result);
   $db->sql_freeresult($result);

   if ($num_rows > 0)
   {
      $group_name[$num_rows]['group_id'] = 0;
      $group_name[$num_rows]['group_name'] = $lang['Not_assigned'];

      for ($i = 0; $i < sizeof($group_name); $i++)
      {
         if (!$default_group)
         {
            $selected = ($i == 0) ? ' selected="selected"' : '';
         }
         else
         {
            $selected = ($group_name[$i]['group_id'] == $default_group) ? ' selected="selected"' : '';
         }

         $group_select .= '<option value="' . $group_name[$i]['group_id'] . '"' . $selected . '>' . $group_name[$i]['group_name'] . '</option>';
      }
   }
   $db->sql_freeresult($result);

   $group_select .= '</select>';

   return $group_select;
}

#
#----[REPLACE WITH ]----
#
function group_select($select_name, $default_group = 0)
{
   global $db, $lang;

   $sql = 'SELECT group_id, group_name
      FROM ' . EXTENSION_GROUPS_TABLE . '
      ORDER BY group_name';

   if (!($result = $db->sql_query($sql)))
   {
      message_die(GENERAL_ERROR, "Couldn't query Extension Groups Table", "", __LINE__, __FILE__, $sql);
   }

   $group_select = '<select name="' . $select_name . '">';
   
   $group_name = $db->sql_fetchrowset($result);
   $num_rows = $db->sql_numrows($result);
   $db->sql_freeresult($result);

   if ($num_rows > 0)
   {
      $group_name[$num_rows]['group_id'] = 0;
      $group_name[$num_rows]['group_name'] = $lang['Not_assigned'];

      for ($i = 0; $i < sizeof($group_name); $i++)
      {
         if (!$default_group)
         {
            $selected = ($i == 0) ? ' selected="selected"' : '';
         }
         else
         {
            $selected = ($group_name[$i]['group_id'] == $default_group) ? ' selected="selected"' : '';
         }

         $group_select .= '<option value="' . $group_name[$i]['group_id'] . '"' . $selected . '>' . $group_name[$i]['group_name'] . '</option>';
      }
   }

   $group_select .= '</select>';

   return $group_select;
}

Posted: Tue Dec 13, 2005 10:05 pm
by ChickenHawk
mike 999 find post to me...i was having same problem...what he gave me fixed it...


David...What is this
Explanation Extension Extension Group Delete

what do i put in Explanation box?

Posted: Tue Dec 13, 2005 10:07 pm
by mike9999
He said that made no change for him, I was looking for something else, then figured that had to be it.. I will try that now.

Posted: Tue Dec 13, 2005 10:08 pm
by ChickenHawk
here Mike999
DavidIQ wrote:
ChickenHawk wrote:Extension Control

Warning: mysql_free_result(): 39 is not a valid MySQL result resource in /home/chickenh/public_html/bboard/db/mysql4.php on line 318


Fix that with this:

Code: Select all

#
#----[OPEN]----
#
attach_mod/includes/functions_selects.php

#
#----[FIND]----
#
function group_select($select_name, $default_group = 0)
{
   global $db, $lang;

   $sql = 'SELECT group_id, group_name
      FROM ' . EXTENSION_GROUPS_TABLE . '
      ORDER BY group_name';

   if (!($result = $db->sql_query($sql)))
   {
      message_die(GENERAL_ERROR, "Couldn't query Extension Groups Table", "", __LINE__, __FILE__, $sql);
   }

   $group_select = '<select name="' . $select_name . '">';
   
   $group_name = $db->sql_fetchrowset($result);
   $num_rows = $db->sql_numrows($result);
   $db->sql_freeresult($result);

   if ($num_rows > 0)
   {
      $group_name[$num_rows]['group_id'] = 0;
      $group_name[$num_rows]['group_name'] = $lang['Not_assigned'];

      for ($i = 0; $i < sizeof($group_name); $i++)
      {
         if (!$default_group)
         {
            $selected = ($i == 0) ? ' selected="selected"' : '';
         }
         else
         {
            $selected = ($group_name[$i]['group_id'] == $default_group) ? ' selected="selected"' : '';
         }

         $group_select .= '<option value="' . $group_name[$i]['group_id'] . '"' . $selected . '>' . $group_name[$i]['group_name'] . '</option>';
      }
   }
   $db->sql_freeresult($result);

   $group_select .= '</select>';

   return $group_select;
}

#
#----[REPLACE WITH ]----
#
function group_select($select_name, $default_group = 0)
{
   global $db, $lang;

   $sql = 'SELECT group_id, group_name
      FROM ' . EXTENSION_GROUPS_TABLE . '
      ORDER BY group_name';

   if (!($result = $db->sql_query($sql)))
   {
      message_die(GENERAL_ERROR, "Couldn't query Extension Groups Table", "", __LINE__, __FILE__, $sql);
   }

   $group_select = '<select name="' . $select_name . '">';
   
   $group_name = $db->sql_fetchrowset($result);
   $num_rows = $db->sql_numrows($result);
   $db->sql_freeresult($result);

   if ($num_rows > 0)
   {
      $group_name[$num_rows]['group_id'] = 0;
      $group_name[$num_rows]['group_name'] = $lang['Not_assigned'];

      for ($i = 0; $i < sizeof($group_name); $i++)
      {
         if (!$default_group)
         {
            $selected = ($i == 0) ? ' selected="selected"' : '';
         }
         else
         {
            $selected = ($group_name[$i]['group_id'] == $default_group) ? ' selected="selected"' : '';
         }

         $group_select .= '<option value="' . $group_name[$i]['group_id'] . '"' . $selected . '>' . $group_name[$i]['group_name'] . '</option>';
      }
   }

   $group_select .= '</select>';

   return $group_select;
}

Posted: Tue Dec 13, 2005 10:09 pm
by DavidIQ
ChickenHawk wrote: mike 999 find post to me...i was having same problem...what he gave me fixed it...


David...What is this
Explanation Extension Extension Group Delete

what do i put in Explanation box?

Where are you seeing that? In the admin control panel? Explanation can be left blank if that's the case. Extension is the type of file (.jpg, .exe, .php, etc.), extension group determines how the file is handled. If you put it as streaming for example the file will play right off the board. Delete is just that...delete the extension.

Posted: Tue Dec 13, 2005 10:12 pm
by mike9999
That took care of it, sorry for the confusion.

Posted: Tue Dec 13, 2005 10:12 pm
by ChickenHawk
yes in the control panel...i knew what all but that explanation box was for...thanks

Posted: Tue Dec 13, 2005 10:19 pm
by DavidIQ
It's like a note to yourself of what the extension is for. Glad I could help :wink:

Posted: Tue Dec 13, 2005 11:22 pm
by sciguy
Yay! :D I finally got it working the way I wanted. However, now I have another question.

When I add other extensions (ex. MP3) in the streaming group, they won't play in the post like the pre-installed .wma will. Is there some kind of way to get this to work? :?

Posted: Tue Dec 13, 2005 11:26 pm
by DavidIQ
sciguy wrote: When I add other extensions (ex. MP3) in the streaming group, they won't play in the post like the pre-installed .wma will. Is there some kind of way to get this to work? :?

What's it doing then? Got an example post for us?

Posted: Tue Dec 13, 2005 11:30 pm
by sciguy
for example-if I try to make a post with that kind of file in it, it says
file is empty


As a work around, I have it in the archive section so that you can just download it. However I would prefer if you could stream it... 8)

Posted: Tue Dec 13, 2005 11:32 pm
by DavidIQ
Check the allowed file size for that group. Might be too small.