HelpHelpSearchSearchMembersMembersCalendarCalendar
Welcome, Guest. Please login or register.

Login with username, password and session length
December 01, 2008, 04:15:35 PM
Please use the support forum for support issues instead of sending me pm's. Thanks.
I will not reply to support issues via pm.
« previous next »
Pages: [1]   Go Down
0 Members and 1 Guest are viewing this topic. Topic Tools  
Read June 04, 2008, 01:14:17 AM #0
GMC

Sticky Topic Question

Hi this is my first post here... and I came here from some help that m3talc0re gave me in a thread on the SMF forum.

I liked the way that you have the thin coloured bar under your sticky topics and I asked to be shown how to achieve this in my forum.

I did that same method, but instead of using windowbg3, I made it add _sticky (so windowbg_sticky and windowbg2_sticky). I don't use either method now, though. I leave them the same as the others, but separated by a bar (like so: http://forums.webtechnica.net/support-b8.0/ )

m3talc0re - can you let us know how you did that?

GMC


I received the following response - which was nice BTW

Find:
	
	
foreach (
$context['topics'] as $topic)
	
	
{

After that, add this:
Code:
if($topic['is_sticky'] && !$stickybar)
{
echo'';
$stickybar = true;
}
else if(!$topic['is_sticky'] && $stickybar && !$normalbar)
{
echo'<tr><td class="catbg" height="6" colspan="', empty($options['display_quick_mod']) ? '6' : '7', '"></td></tr>';
$normalbar = true;
}


and after I did this I have this problem

Is there a way to fill in the last box - I take off the quick mod box and it doesnt fill through the last post (the end box)

Cheers

GMC



I am running SMF 1.1.15 and its the elctron theme (Not supported by SMF anymore)

Thanks for any help I may be given

GMC

PS My site has some warez amongst many other things so I wont paste a link to it, and I am more than happy to post the full messageindex.template file if that would help


« Last Edit: June 05, 2008, 12:14:58 PM by m3talc0re »
Offline  
Read June 04, 2008, 09:35:45 AM #1
m3talc0re

Re: Sticky Topic Question

You see where it says
colspan="', empty($options['display_quick_mod']) ? '6' : '7', '"

Change that 6 to a 7 and that 7 to an 8. I forgot that my own message index template has one less column than smf's (the Author is in the same cell as the topic title).


The real hell is your life gone wrong.
Offline  
Read June 04, 2008, 11:04:29 PM #2
GMC

Re: Sticky Topic Question

You see where it says
colspan="', empty($options['display_quick_mod']) ? '6' : '7', '"

Change that 6 to a 7 and that 7 to an 8. I forgot that my own message index template has one less column than smf's (the Author is in the same cell as the topic title).
You know I tried a miriad of different numbers in these spots - but I obviously didnt try that combination

I will try this now

and thanks for the support

GMC
Offline  
Read June 04, 2008, 11:24:57 PM #3
GMC

Re: Sticky Topic Question



Work a treat - thanks
Offline  
Read July 11, 2008, 05:06:19 AM #4
GMC

Re: Sticky Topic Question

Hi

I have noticed my error log full of these

8: Undefined variable: normalbar
File: /home/xxxcas67/public_html/casxxxxxxxx.com/island2/Themes/cast/MessageIndex.template.php Line: 164

about 15,000 entries in fact - lol

Here is the code that I have at line 164

 // No topics.... just say, "sorry bub".
      else
         echo '
               <td class="catbg3" width="100%" colspan="7">', $txt[151], '</td>';

      echo '
            </tr>';

      foreach ($context['topics'] as $topic)
      {
               if($topic['is_sticky'] && !$stickybar)
         {
            echo'';
            $stickybar = true;
         }
        else if(!$topic['is_sticky'] && $stickybar && !$normalbar)
         {
            echo'<tr><td class="catbg" height="6" colspan="', empty($options['display_quick_mod']) ? '7' : '8', '"></td></tr>';
            $normalbar = true;
         }

       echo '
            <tr>
               <td class="windowbg2" valign="middle" align="center" width="5%">
                  <img src="', $settings['images_url'], '/topic/', $topic['class'], '.gif" alt="" />
               </td>
               <td class="windowbg2" valign="middle" align="center" width="4%">
                  <img src="', $topic['first_post']['icon_url'], '" alt="" />
               </td>
               <td class="windowbg' , $topic['is_sticky'] ? '3' : '' , '" valign="middle" ', (!empty($topic['quick_mod']['remove']) ? 'id="topic_' . $topic['first_post']['id'] . '" onmouseout="mouse_on_div = 0;" onmouseover="mouse_on_div = 1;" ondblclick="modify_topic(\'' . $topic['id'] . '\', \'' . $topic['first_post']['id'] . '\', \'' . $context['session_id'] . '\');"' : ''), ' width="42%">
                  ', $topic['is_sticky'] ? '' : '' , '<span id="msg_' . $topic['first_post']['id'] . '">', $topic['first_post']['link'], '</span>', $topic['is_sticky'] ? '' : '';

Red line is line 164


Is there someway to "define" it so that I dont get these errors??

Thanks again for having a look at this for me

GMC
Offline  
Read July 11, 2008, 10:13:42 PM #5
m3talc0re

Re: Sticky Topic Question

Okay, you see the foreach statement? Above it, make sure you have this:
	
	
$stickybar false;
	
	
$normalbar false;
	
	
foreach(
$context['topics'] as $topic)
	
	
{


The real hell is your life gone wrong.
Offline  
Read July 13, 2008, 05:01:28 AM #6
GMC

Re: Sticky Topic Question

Thanks again

This did the trick

I more than appreciate it

GMC
Offline  
Pages: [1]   Go Up
Jump to:  

Theme by Webtechnica.net
MySQL PHP Powered by SMF 1.1.6 | SMF © 2006-2008, Simple Machines LLC XHTML 1.0 CSS