News:

Join the Facebook Fan Page.

Main Menu

Scrolling Recent Posts/

Started by Vinoth, July 17, 2004, 05:38:09 PM

Previous topic - Next topic

Vinoth

Can we have this feature, a scrolling recent posts to be enabled/


for ex  http://www.thefreewebhosting.com


you can see the recent posts scroll,

Advantage  :  we can have more topics to show, and users can see all 10 -15 posts scrolling,

what about this/ 
Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

Owdy

#1
You can do this by themes  http://www.halko.net/smf/index.php

// Show lots of posts.
elseif (!empty($context['latest_posts']))
{
echo '<marquee  behavior="scroll" direction="up" height="50" scrolldelay="300" scrollamount="2">
<table width="100%" border="0">';
/* Each post in latest_posts has:
board (with an id, name, and link.), topic (the topic's id.), poster (with id, name, and link.),
subject, short_subject (shortened with...), time, link, and href. */
foreach ($context['latest_posts'] as $post)
echo '
<tr>
<td align="right" valign="top" nowrap="nowrap">[', $post['board']['link'], ']</td>
<td valign="top">', $post['link'], ' ', $txt[525], ' ', $post['poster']['link'], '</td>
<td align="right" valign="top" nowrap="nowrap">', $post['time'], '</td>
</tr>';
echo '
</table></marquee>';
}
echo '
</td>
</tr>';
}
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Vinoth

ah thanx, does this make the page load slow
Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

Tomer

Hmmm well of course it would add some load to the page, but so much that you would notice, dont think so.

Grudge

I can imagine Unknown biting off his hands if we added <marquee> into the default template... ever :P
I'm only a half geek really...

Tomer


Amacythe

well... you could always hire someone to remove his teeth first ;)

andrea

That scroll will not be browser proof.

Andrea Hubacher
Ex Lead Support Specialist
www.simplemachines.org

Personal Signature:
Most recent work:
10 Aqua Themes for SMF



Vinoth

Vinoth And Sachin ( SpecHackers Team )
The Best  Way to Help Poor Is not Becoming One Of Them.

Owdy

Quote from: andrea on July 18, 2004, 05:46:37 PM
That scroll will not be browser proof.
Yeah, it wont work with browsers like opera 5 or some other old browsers
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

Oldiesmann

#10
It works fine in IE, Mozilla, Firefox and newer versions of Netscape, which should cover 90% of your members... Not sure if it works in the most recent version of Opera or not.
Michael Eshom
Christian Metal Fans

Owdy

Quote from: Oldiesmann on July 19, 2004, 12:18:06 PM
Not sure if it works in the most recent version of Opera or not.
Works fine in opera7
Former Lead Support Specialist

Tarvitsetko apua SMF foorumisi kanssa? Otan työtehtäviä vastaan, lue:http://www.simplemachines.org/community/index.php?topic=375918.0

raedzaro

thanks I did it and it works fine with me too

but  :-[ how could i put it in all pages under the menu bar? any Idea?

snork13

Quote from: raedzaro on March 07, 2005, 09:34:44 AM
thanks I did it and it works fine with me too

but  :-[ how could i put it in all pages under the menu bar? any Idea?

instead of board index, add it to the index.template :D
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

FaSan

Stop it on Mouse Over ?  ;)

<marquee  behavior="scroll" direction="up" height="50" scrolldelay="100" scrollamount="2" onmouseover="this.stop()" onmouseout="this.start()">




FaSan

raedzaro

Quote from: snork13 on March 07, 2005, 05:18:06 PM
Quote from: raedzaro on March 07, 2005, 09:34:44 AM
thanks I did it and it works fine with me too

but  :-[ how could i put it in all pages under the menu bar? any Idea?

instead of board index, add it to the index.template :D

Thanks but what is the code and where exactly I'm poor with php

Oldiesmann

Add that right below template_menu(); in index.template.php
Michael Eshom
Christian Metal Fans

raedzaro

I did what you told me bu it gave me the following error message:
Template Parse Error!
There was a problem loading the /home/jordanfo/public_html/Themes/arabic/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

snork13

Quote from: raedzaro on March 08, 2005, 10:45:18 AM
I did what you told me bu it gave me the following error message:
Template Parse Error!
There was a problem loading the /home/jordanfo/public_html/Themes/arabic/index.template.php template or language file. Please check the syntax and try again - remember, single quotes (') often have to be escaped with a slash (\). To see more specific error information from PHP, try accessing the file directly.

You may want to try to refresh this page or use the default theme.

can you post your  before and after code...i would like to see what you have done....thanks
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

raedzaro

the Code above menu
Quote
   // The "key stats" box.
   echo '
               <div class="headertitles" style="width: 260px;"><img src="' . $settings['images_url'] . '/blank.gif" height="12" alt="" /></div>
               <div class="headerbodies" style="width: 260px; position: relative; background-image: url(' . $settings['images_url'] . '/box_bg.gif);">
                  <img src="' . $settings['images_url'] . '/', $context['user']['language'], '/keystats.gif" style="position: absolute; RIGHT: -1px; top: -16px;" alt="" />
                  <div style="height: 35px; padding: 5px;" class="smalltext">
                     <b>', $modSettings['totalMessages'], '</b> ', $txt[95], ' ', $txt['smf88'], ' <b>', $modSettings['totalTopics'], '</b> ', $txt[64], ' ', $txt[525], ' <b>', $modSettings['memberCount'], '</b> ', $txt[19], '<br />
                     ', $txt[656], ': <b> <a href="', $scripturl, '?action=profile;u=', $modSettings['latestMember'], '">', $modSettings['latestRealName'], '</a></b>
                  </div>
               </div>';

   echo '
            </td>
         </tr>
      </table>

      <a href="#" onclick="shrinkHeader(!current_header); return false;"><img id="upshrink" src="' . $settings['images_url'] . '/', empty($options['collapse_header']) ? 'upshrink.gif' : 'upshrink2.gif', '" alt="*" title="', $txt['upshrink_description'], '" style="margin: 2px 0;" border="0" /></a><img id="upshrinkTemp" src="' . $settings['images_url'] . '/blank.gif" alt="" style="margin-LEFT: 2ex;" />';

      // Show the menu here, according to the menu sub template.
the below:
Quote// The main content should go here.  A table is used because IE 6 just can't handle a div.
   echo '
   <table width="100%" cellpadding="0" cellspacing="0" border="0"><tr>
      <td id="bodyarea" style="padding: 1ex 20px 2ex 20px;">';
}

function template_main_below()
{
   global $context, $settings, $options, $scripturl, $txt;

   echo '</td>
   </tr></table>';


Advertisement: