Members: 16,996
Threads: 38,846
Posts: 159,391
Online: 23

Newest Member: Kl_broka@rediffmail.com


Odoo.tv - Outdoor Television


Sedo - Domains kaufen und verkaufen das Projekt mambers.com steht zum Verkauf Besucherstatistiken von mambers.com etracker® Web-Controlling statt Logfile-Analyse

Go Back   Mambers.com > Archive > Mambo 4.5 > Mambo 4.5 'How Do I' Questions

 
 
LinkBack Thread Tools Display Modes
Old 01.07.2004, 21:57   #1 (permalink)
Baby Mamber
 
dalmuti's Avatar
 
Join Date: Apr 2004
Location: Kansas
Posts: 17
dalmuti is on a distinguished road
Default Add HR beneath each "Read More" automatically

I want each of my stories on the frontpage to have a hard rule below the "read more" for nice separation.

Can anyone give me exact instructions? I know nothing about where to begin looking, nor what to edit.

I tried adding the HR directly to the article but when I did it put it before the "read more".

Thanks,

Dal
__________________
Webmaster - Winning Holdem
dalmuti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Sponsored Links
Old 01.07.2004, 22:29   #2 (permalink)
Expert Mamber
 
pflegeonline's Avatar
 
Join Date: Apr 2004
Location: Schladming/Graz
Posts: 414
pflegeonline is on a distinguished road
Default Re: Add HR beneath each "Read More" automatically

Go per FTP to components/com_frontpage and open the frontpage.php
replace all of the code with the following given then save to server and go!

PHP Code:
<?php
// $Id: frontpage.php,v 1.39 2004/04/06 21:28:52 eddieajau Exp $
/**
* Content code
* @package Mambo Open Source
* @Copyright (C) 2000 - 2003 Miro International Pty Ltd
* @ All rights reserved
* @ Mambo Open Source is Free Software
* @ Released under GNU/GPL License : [url]http://www.gnu.org/copyleft/gpl.html[/url]
* @version $Revision: 1.39 $
**/

defined'_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

//require_once( $mainframe->getPath( 'front_html' ) );
require_once( $mainframe->getPath'front_html''com_content') );

frontpage$option );

/**
* Select all the content items that are within the 'frontpage' date display times
*
* The following parameters are available to the frontpage
* count=n : display a maximum of n lines
* intro=m : only show the intro for the first m items
* image=b : b=true shows images otherwise just text
* @param database A database connection object
*/
function frontpage$option ) {
    global 
$database$mainframe$my$Itemid;
    global 
$mosConfig_offset;

    
$access = !$mainframe->getCfg'shownoauth' );

    
$menu= new mosMenu$database );
    
$menu->load$Itemid );
    
$params mosParseParams$menu->params );

    
$count = isset( $params->count ) ? $params->count 6;
    
$intro = isset( $params->intro ) ? $params->intro 3;
    
$image = @$params->image MASK_IMAGES 0;
    
$header = @$params->header;
    
$empty = @$params->empty;
    
$orderby = @$params->orderby;

    switch (
strtolower$orderby )) {
        case 
'date':
            
$orderby "a.created";
            break;
        case 
'rdate':
            
$orderby "a.created DESC";
            break;
        default:
            
$orderby "f.ordering, a.ordering ASC, a.catid, a.sectionid";
            break;
    }

    if (
$header) {
        echo 
"<span class=\"frontpageheader\">$header</span>";
    }

    
$t = new mosTemplate$database );
    
$t->load);

    
$now date"Y-m-d H:i:s"time()+$mosConfig_offset*60*60 );

    
$database->setQuery"SELECT ROUND(v.rating_sum/v.rating_count) AS rating, v.rating_count,"
    
"\na.*, u.name AS author, u.usertype"
    
"\nFROM #__content AS a"
    
"\nINNER JOIN #__content_frontpage AS f ON f.content_id = a.id"
    
"\nLEFT JOIN #__users AS u ON u.id = a.created_by"
    
"\nLEFT JOIN #__content_rating AS v ON a.id = v.content_id"
    
"\nWHERE a.state='1'"
    
. ($access "\n    AND a.access <= '$my->gid'" "")
    . 
"\n    AND (publish_up = '0000-00-00 00:00:00' OR publish_up <= NOW())"
    
"\n    AND (publish_down = '0000-00-00 00:00:00' OR publish_down >= NOW())"
    
"\nORDER BY $orderby"
    
. ($count " LIMIT $count" "")
    );
    
//echo $database->explain();
    //echo $database->getQuery();
    
$rows $database->loadObjectList();
    echo 
$database->getErrorMsg();

    
$n count$rows );
    if (
$count && $count $n) {
        
$n $count;
    }

    if (
$n 0) {
        
$col=$t->col_main;

        echo 
"\n<table width=\"100%\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n";

        
$i2=0;
        
$n2=$n;
        
$intro2 $intro;
        
// Leading story
        
if ($col==3) {
            echo 
"<tr>\n";
            echo 
"<td valign=\"top\" colspan=\"2\">\n";
            
show$rows[$i2], MASK_READON|$image$option );
            echo 
"<hr>\n";
                  echo 
"</td>\n";
            echo 
"</tr>\n";
            
$i2++;
            
$n2--;
            
$intro2--;
        }

        for (
$i=0$i $n2$i++) {
            if (!(
$i%2) || $col==1) {
                echo 
"<tr>\n";
            }
            echo 
$col=="<td valign=\"top\">\n" "<td width=\"50%\" valign=\"top\">\n";
            if (
$i $intro2 || $intro==0) {
                
show$rows[$i+$i2], MASK_READON|$image$option );
                        echo 
"<hr>\n";
            } else {
                
HTML_content::showLinks$rows$intro$n );
                        echo 
"<hr>\n";
                echo 
"</td>\n</tr>\n";
                break;
            }
            echo 
"</td>\n";

            if (
$i%|| $col==1) {
                echo 
"</tr>\n";
            }
        }
        echo 
"\n</table>";

    } else {
        if (
$empty) {
            echo 
"<br /><br />$empty";
        } else {
            echo 
"<br /><br />No items to display";
        }
    }
}

function 
show$row$mask=0$option ) {
    global 
$mainframe$my$acl;
    global 
$mosConfig_live_site$mosConfig_absolute_path;

    if (
$row->id === null || $row->state != 1) {
        
mosNotAuth();
        return;
    }

    
$mask |= $mainframe->getCfg'hideAuthor' ) ? MASK_HIDEAUTHOR 0;
    
$mask |= $mainframe->getCfg'hideCreateDate' ) ? MASK_HIDECREATEDATE 0;
    
$mask |= $mainframe->getCfg'hideModifyDate' ) ? MASK_HIDEMODIFYDATE 0;
    
$mask |= $mainframe->getCfg'vote' ) ? MASK_VOTES 0;

    
$mask |= MASK_HIDEPDF;
    
$mask |= MASK_HIDEPRINT;
    
$mask |= MASK_HIDEEMAIL;
    
$mask |= $mainframe->getCfg'link_titles' ) ? MASK_LINK_TITLES 0;

    
//do images the mosbot way
    
$row->text $row->introtext;
    
$bots mosReadDirectory"$mosConfig_absolute_path/mambots""\.php$" );
    
sort$bots );
    foreach (
$bots as $bot) {
        require 
"mambots/$bot";
    }

    
// record the hit
    
if (!($mask&MASK_READON)) {
        
$row->hit();
    }

    
$access = new stdClass();
    
$access->canEdit $acl->acl_check'action''edit''users'$my->usertype'content''all' );
    
$access->canEditOwn $acl->acl_check'action''edit''users'$my->usertype'content''own' );

    
HTML_content::show$row$mask$access0$option );
}
?>
__________________
pflegeonline is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01.07.2004, 22:39   #3 (permalink)
Baby Mamber
 
dalmuti's Avatar
 
Join Date: Apr 2004
Location: Kansas
Posts: 17
dalmuti is on a distinguished road
Default Re: Add HR beneath each "Read More" automatically

Thanks,

That was exactly what I wanted. Appreciate your fast response.

Dalmuti
__________________
Webmaster - Winning Holdem
dalmuti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Old 01.07.2004, 22:42   #4 (permalink)
Expert Mamber
 
pflegeonline's Avatar
 
Join Date: Apr 2004
Location: Schladming/Graz
Posts: 414
pflegeonline is on a distinguished road
Default Re: Add HR beneath each "Read More" automatically

No problem!

That's community!

greetz from austria

Stefan
__________________
pflegeonline is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
 

Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Read More" Link leads to restricted news on public category djdrue Mambo 4.5 Bugs 7 15.12.2004 11:06
Get rid of "last updated" and move "read more" xft Mambo 4.5 'How Do I' Questions 2 27.06.2004 23:12
How to restrict "read more" access? cozimek Mambo 4.5 'How Do I' Questions 2 27.06.2004 00:46
Turn off "read more" when there isn't more to read jtf Mambo 4.5 'How Do I' Questions 7 09.06.2004 07:38
help needed on small "read more" problem digidydave1 Mambo 4.5 General Talk 0 05.06.2004 05:22


All times are GMT +2. The time now is 06:10.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.1.0
A vBSkinworks Design
© Copyright 2004-2008 by Arthur Konze Webdesign.