Bravo List
Register
Go Back   > Bravo List > Source Code > Archived Trackers > TBDev
View Poll Results: Do You Like?
Yes 5 71.43%
No 2 28.57%
Voters: 7. You may not vote on this poll

Reply
  #1  
Old 5th May 2015, 11:11
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default [TBDEV][09] v2 News Feed
Click the image to open in full size.
Click the image to open in full size.

Quote:
The MIT License (MIT)
Copyright © 2015 UniqueScene
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
News Feed Script -


Code:
    $adminbutton = '';   
    
    if (get_user_class() >= UC_ADMINISTRATOR)
          $adminbutton = "&nbsp;<span  style='float:right;'><a href='admin.php?action=news'>News  page</a></span>\n";
          
    $HTMLOUT .= "
    <div style=';padding: 1em;width: 1085px;' class='mCol'>
    <div class='myBlock'><div style='margin-top:  5px;box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255,  255, 255, 0.2);'>
    <div class='myBlock-cap'><span  style='font-weight:bold;font-size:12pt;'>{$lang['news_title']}</span>{$adminbutton}</div></div>
    <div style='padding: 5px;margin-top: -3px;margin-left: 0px;width:  1055px;box-shadow: inset 0 1px 0 rgba(255, 255, 255,  0.2);'></div>
    <br />";
      
    $res = mysql_query("SELECT * FROM news WHERE added + ( 3600 *24 *45 ) >
                    ".time()." ORDER BY added DESC LIMIT 10") or sqlerr(__FILE__, __LINE__);
                    
    if (mysql_num_rows($res) > 0)
    {
      require_once "include/bbcode_functions.php";

      $button = "";
      
      while($array = mysql_fetch_assoc($res))
      {
        if (get_user_class() >= UC_ADMINISTRATOR)
        {
          $button = "<div style='float:right;'><a  href='admin.php?action=news&amp;mode=edit&amp;newsid={$array['id']}'><img  style='margin-top: -5px;' width='20' height='20' src='http://i.imgbox.com/gWUsBcEZ.png'  title='Edit'/></a>&nbsp;<a  href='admin.php?action=news&amp;mode=delete&amp;newsid={$array['id']}'><img  style='margin-top: -5px;' width='20' height='20' src='http://i.imgbox.com/fe48nYbb.png' title='Delete'/></a></div>"; 
        }
        
        $HTMLOUT .= "<div style='margin-top: -15px;margin-left:  5px;width: 1045px;box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9), inset 0 1px  0 rgba(255, 255, 255, 0.2);'>
                     <div class='myBlock-cap'><span  style='font-size:8pt;color: #FFF;'>Posted ".get_date(  $array['added'],'DATE') . "  &nbsp;&nbsp;{$array['headline']}</span>  {$button}</div></div>
                     <div style='padding: 5px;margin-top:  -3px;margin-left: 5px;width: 1045px;box-shadow: inset 0 1px 0 rgba(255,  255, 255, 0.2);'></div>\n";
        
        $HTMLOUT .= "<div style='margin-top: -15px;margin-left:  5px;width: 1045px;box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9), inset 0 1px  0 rgba(255, 255, 255, 0.2);'>
                     <div class='myBlock-con'></div>\n";
        
        $HTMLOUT .= "<div style='margin-top: -8px;border: 1px solid  #222;'  class='myBlock-con'>".format_comment($array['body'])."</div><div></div></div><div  style='padding: 1.5em;'></div><div style='margin-top:  -35px;'></div>";
        
      
      }
     
    }

    $HTMLOUT .= "</div></div></div>\n";
CSS -

Code:
.myBlock {
    display: block;
    background-color: #151515;
    background-repeat: repeat-x;
    background-position: top;
    width: 100%;
    border: 1px solid #222;
    margin: 0px;
    padding: 0px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.2);         
}
.myBlock-cap {
    display: block;
    padding-right: 10px;
    padding-left: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #FFF;
    margin: 0px;
    background-color: #333333;
    line-height: 200%;
    position: relative;
    bottom: 4px
}
.myBlock-con {
    display: block;
    padding: 7px;
}

Last edited by BamBam0077; 5th May 2015 at 12:55.
Reply With Quote
Reply

Tags
feed , news , tbdev09 , v2

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 11:01. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.