Welcome to Geeklog, Anonymous Wednesday, November 27 2024 @ 08:03 am EST

Geeklog Forums

Can you help me with a bit of code.


Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
I found this
Text Formatted Code
global $_TABLES;

$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (24,25)");
while ($row = DB_fetchArray($res)) {
        $display .= COM_formatBlock($row);
}
return $display


To put my RSS feeds in a Static Page. And it works great.
But I don't know how to add to it.

I am trying to get it into something like tables.
I got it to go down like so..

Text Formatted Code
global $_TABLES;

$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (25)");
while ($row = DB_fetchArray($res)) {
        $display .= COM_formatBlock($row);
}

global $_TABLES;

$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (24)");
while ($row = DB_fetchArray($res)) {
        $display .= COM_formatBlock($row);
}

return $display;


But I have no clue how to get it to go left to right.
Every thing I have tried (and thats not much cuz I'm old, slow and stupid! lol)
See I am going to be running my own RSS feeds to save space on my main page.
The sight I am working on now has got to the point that no one can really keep up with the news because there is so much of it that
when something is submitted by the next day it's 3 pages back. Lil

So I also want to put each news Sections name.
Like if it was here it would be geeklog, geeklog2, announcements and so on.

Can someone please put this together for me.

Thanks!
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
ok here is as far as I got.
Text Formatted Code
?>
        <table cellspacing="1" cellpadding="10" width="100%" align="center" summary="" border="1">
            <tbody>
                <tr>
                    <td>
<?php
global $_TABLES;

$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (25)");
while ($row = DB_fetchArray($res)) {
        $display .= COM_formatBlock($row);
}

echo $display;
?>
                   </td>
                    <td>
<?php
$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (24)");
while ($row = DB_fetchArray($res)) {
        $display .= COM_formatBlock($row);
}

echo $display;
?>
               </td>
                </tr>
            </tbody>
        </table>
It's putting lines in the code that I don't need. And it is doing the first code twice. Can someone smarter then me please till me whats wrong???? :banghead:
 Quote

ironmax

Anonymous
Is this possibly what you might be looking for? I ran it on my site for years but moved over to direct XML database linking to the source feeds. If your not looking for something like this, then maybe someone else could use it.

Text Formatted Code

<?php
require_once('lib-common.php');

$display = COM_siteHeader('none');


// These are names of the rdf blocks, their position
// and their urls.
$_NEWS['KBAlerts-WinUpdates'] = '1';
$_URLS[1]="http://www.kbalertz.com/rss/wupd.xml";
$_NEWS['KBAlerts-Win2K'] = '2';
$_URLS[2]="http://www.kbalertz.com/rss/win2000.xml";
$_NEWS['KBAlertz-WinNTServ4.0'] = '3';
$_URLS[3]="http://www.kbalertz.com/rss/nts40.xml";
$_NEWS['KBAlertz-Win98'] = '4';
$_URLS[4]="http://www.kbalertz.com/rss/w98.xml";
$_NEWS['KBAlertz-WinXP'] = '5';
$_URLS[5]="http://www.kbalertz.com/rss/winxp.xml";
$_NEWS['phpnews']=6;
$_URLS[6]="http://news.php.net";
$mysql = "SELECT *,UNIX_TIMESTAMP(rdfupdated) as date FROM {$_TABLES['blocks']} ";
$mysql .= "WHERE type='portal' order by blockorder,title asc";
$BLOCKS = DB_query($mysql);
$nrows = DB_numRows($BLOCKS);
for($i=0;$i<$nrows;$i++) {
    $A=DB_fetchArray($BLOCKS);
    $bname=$A['name'];
    if ($_NEWS["$bname"] > 0) {
        COM_rdfCheck( $A['bid'], $A['rdfurl'], $A['date'] );
        //COM_rdfImport($A['bid'],$A['rdfurl']);
        $tmp = $A['content'];
        if (substr($tmp,0,5) == "Parse") { $tmp="Site feed Down"; }
        switch($_NEWS["$bname"]) {
        case '1':
            $t1 = "" . $A['title'] . '</a>';
            $news1 = COM_startBlock($t1);
            $news1 .= $tmp;
            $news1 .= COM_endBlock();
            break;
        case '2':
            $t1 = "" . $A['title'] . '</a>';
            $news2 = COM_startBlock($t1);
            $news2 .= $tmp;
            $news2 .= COM_endBlock();
            break;
        case '3':
            $t1 = "" . $A['title'] . '</a>';
            $news3 = COM_startBlock($t1);
            $news3 .= $tmp;
            $news3 .= COM_endBlock();
            break;
        case '4':
            $t1 = "" . $A['title'] . '</a>';
            $news4 = COM_startBlock($t1);
            $news4 .= $tmp;
            $news4 .= COM_endBlock();
            break;
        case '5':
            $t1 = "" . $A['title'] . '</a>';
            $news5 = COM_startBlock($t1);
            $news5 .= $tmp;
            $news5 .= COM_endBlock();
            break;
        case '6':
            $t1 = "<a href='{$_URLS[6]}'>" . $A['title'] . '</a>';
            $news6 = COM_startBlock($t1);
            $news6 .= $tmp;
            $news6 .= COM_endBlock();
            break;
        }
    }
}
$display .= "<table width='100%' border='0' cellspacing='1' cellpadding='0'>";
$display .= "<tr><td width='50%' valign='top'>{$news1}</td><td width='50%' valign='top'>{$news2}</td></tr>";
$display .= "<tr><td width='50%' valign='top'>{$news3}</td><td width='50%' valign='top'>{$news4}</td></tr>";
$display .= "<tr><td width='50%' valign='top'>{$news5}</td><td width='50%' valign='top'>{$news6}</td></tr>";
$display .= "<tr><td colspan='2' align='center'>";
$display .= "Do you want to see a catagory thats not listed, and";
$display .= " You think it should be here";
$display .= " -- Send us the info</td></tr></table>";
$display .= COM_siteFooter();
echo $display;
?>
 
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
Quote by: ironmax

Is this possibly what you might be looking for? I ran it on my site for years but moved over to direct XML database linking to the source feeds. If your not looking for something like this, then maybe someone else could use it.

Text Formatted Code

<?php
require_once('lib-common.php');

$display = COM_siteHeader('none');


// These are names of the rdf blocks, their position
// and their urls.
$_NEWS['KBAlerts-WinUpdates'] = '1';
$_URLS[1]="http://www.kbalertz.com/rss/wupd.xml";
$_NEWS['KBAlerts-Win2K'] = '2';
$_URLS[2]="http://www.kbalertz.com/rss/win2000.xml";
$_NEWS['KBAlertz-WinNTServ4.0'] = '3';
$_URLS[3]="http://www.kbalertz.com/rss/nts40.xml";
$_NEWS['KBAlertz-Win98'] = '4';
$_URLS[4]="http://www.kbalertz.com/rss/w98.xml";
$_NEWS['KBAlertz-WinXP'] = '5';
$_URLS[5]="http://www.kbalertz.com/rss/winxp.xml";
$_NEWS['phpnews']=6;
$_URLS[6]="http://news.php.net";
$mysql = "SELECT *,UNIX_TIMESTAMP(rdfupdated) as date FROM {$_TABLES['blocks']} ";
$mysql .= "WHERE type='portal' order by blockorder,title asc";
$BLOCKS = DB_query($mysql);
$nrows = DB_numRows($BLOCKS);
for($i=0;$i<$nrows;$i++) {
    $A=DB_fetchArray($BLOCKS);
    $bname=$A['name'];
    if ($_NEWS["$bname"] > 0) {
        COM_rdfCheck( $A['bid'], $A['rdfurl'], $A['date'] );
        //COM_rdfImport($A['bid'],$A['rdfurl']);
        $tmp = $A['content'];
        if (substr($tmp,0,5) == "Parse") { $tmp="Site feed Down"; }
        switch($_NEWS["$bname"]) {
        case '1':
            $t1 = "" . $A['title'] . '</a>';
            $news1 = COM_startBlock($t1);
            $news1 .= $tmp;
            $news1 .= COM_endBlock();
            break;
        case '2':
            $t1 = "" . $A['title'] . '</a>';
            $news2 = COM_startBlock($t1);
            $news2 .= $tmp;
            $news2 .= COM_endBlock();
            break;
        case '3':
            $t1 = "" . $A['title'] . '</a>';
            $news3 = COM_startBlock($t1);
            $news3 .= $tmp;
            $news3 .= COM_endBlock();
            break;
        case '4':
            $t1 = "" . $A['title'] . '</a>';
            $news4 = COM_startBlock($t1);
            $news4 .= $tmp;
            $news4 .= COM_endBlock();
            break;
        case '5':
            $t1 = "" . $A['title'] . '</a>';
            $news5 = COM_startBlock($t1);
            $news5 .= $tmp;
            $news5 .= COM_endBlock();
            break;
        case '6':
            $t1 = "<a href='{$_URLS[6]}'>" . $A['title'] . '</a>';
            $news6 = COM_startBlock($t1);
            $news6 .= $tmp;
            $news6 .= COM_endBlock();
            break;
        }
    }
}
$display .= "<table width='100%' border='0' cellspacing='1' cellpadding='0'>";
$display .= "<tr><td width='50%' valign='top'>{$news1}</td><td width='50%' valign='top'>{$news2}</td></tr>";
$display .= "<tr><td width='50%' valign='top'>{$news3}</td><td width='50%' valign='top'>{$news4}</td></tr>";
$display .= "<tr><td width='50%' valign='top'>{$news5}</td><td width='50%' valign='top'>{$news6}</td></tr>";
$display .= "<tr><td colspan='2' align='center'>";
$display .= "Do you want to see a catagory thats not listed, and";
$display .= " You think it should be here";
$display .= " -- Send us the info</td></tr></table>";
$display .= COM_siteFooter();
echo $display;
?>
 




I am not sure how this code works.
I played with it a bit but eather get
Text Formatted Code
Parse error: syntax error, unexpected '<' in C:\wamp\www\plugins\staticpages\functions.inc(841) : eval()'d code on line 1
 

or nothing at all
 Quote

Status: offline

mst3kroqs

Forum User
Regular Poster
Registered: 10/18/05
Posts: 78
Location:Cary, NC USA
Try removing the <?php and ?> from the beginning and end of the staticpage PHP content.
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
tryed that. Just got this...

Text Formatted Code

An error has occurred:
2 - require_once(lib-common.php) [function.require-once]: failed to open stream: No such file or directory @ C:\wamp\www\plugins\staticpages\functions.inc(841) : eval()'d code line 1

array(5) {
  ["sp_content"]=>
  string(3108) "require_once('lib-common.php');

$display = COM_siteHeader('none');


// These are names of the rdf blocks, their position
// and their urls.
$_NEWS['KBAlerts-WinUpdates'] = '1';
$_URLS[1]="http://www.kbalertz.com/rss/wupd.xml";
$_NEWS['KBAlerts-Win2K'] = '2';
$_URLS[2]="http://www.kbalertz.com/rss/win2000.xml";
$_NEWS['KBAlertz-WinNTServ4.0'] = '3';
$_URLS[3]="http://www.kbalertz.com/rss/nts40.xml";
$_NEWS['KBAlertz-Win98'] = '4';
$_URLS[4]="http://www.kbalertz.com/rss/w98.xml";
$_NEWS['KBAlertz-WinXP'] = '5';
$_URLS[5]="http://www.kbalertz.com/rss/winxp.xml";
$_NEWS['phpnews']=6;
$_URLS[6]="http://news.php.net";
$mysql = "SELECT *,UNIX_TIMESTAMP(rdfupdated) as date FROM {$_TABLES['blocks']} ";
$mysql .= "WHERE type='portal' order by blockorder,title asc";
$BLOCKS = DB_query($mysql);
$nrows = DB_numRows($BLOCKS);
for($i=0;$i<$nrows;$i++) {
    $A=DB_fetchArray($BLOCKS);
    $bname=$A['name'];
    if ($_NEWS["$bname"] > 0) {
        COM_rdfCheck( $A['bid'], $A['rdfurl'], $A['date'] );
        //COM_rdfImport($A['bid'],$A['rdfurl']);
        $tmp = $A['content'];
        if (substr($tmp,0,5) == "Parse") { $tmp="Site feed Down"; }
        switch($_NEWS["$bname"]) {
        case '1':
            $t1 = "" . $A['title'] . '</a>';
            $news1 = COM_startBlock($t1);
            $news1 .= $tmp;
            $news1 .= COM_endBlock();
            break;
        case '2':
            $t1 = "" . $A['title'] . '</a>';
            $news2 = COM_startBlock($t1);
            $news2 .= $tmp;
            $news2 .= COM_endBlock();
            break;
        case '3':
            $t1 = "" . $A['title'] . '</a>';
            $news3 = COM_startBlock($t1);
            $news3 .= $tmp;
            $news3 .= COM_endBlock();
            break;
        case '4':
            $t1 = "" . $A['title'] . '</a>';
            $news4 = COM_startBlock($t1);
            $news4 .= $tmp;
            $news4 .= COM_endBlock();
            break;
        case '5':
            $t1 = "" . $A['title'] . '</a>';
            $news5 = COM_startBlock($t1);
            $news5 .= $tmp;
            $news5 .= COM_endBlock();
            break;
        case '6':
            $t1 = "<a href='{$_URLS[6]}'>" . $A['title'] . '</a>';
            $news6 = COM_startBlock($t1);
            $news6 .= $tmp;
            $news6 .= COM_endBlock();
            break;
        }
    }
}
$display .= "<table width='100%' border='0' cellspacing='1' cellpadding='0'>";
$display .= "<tr><td width='50%' valign='top'>{$news1}</td><td width='50%' valign='top'>{$news2}</td></tr>";
$display .= "<tr><td width='50%' valign='top'>{$news3}</td><td width='50%' valign='top'>{$news4}</td></tr>";
$display .= "<tr><td width='50%' valign='top'>{$news5}</td><td width='50%' valign='top'>{$news6}</td></tr>";
$display .= "<tr><td colspan='2' align='center'>";
$display .= "Do you want to see a catagory thats not listed, and";
$display .= " You think it should be here";
$display .= " -- Send us the info</td></tr></table>";
$display .= COM_siteFooter();
echo $display;"
  ["sp_php"]=>
  string(1) "2"
  ["_SP_CONF"]=>
  &array(11) {
    ["version"]=>
    string(5) "1.4.3"
    ["allow_php"]=>
    int(1)
    ["sort_by"]=>
    string(2) "id"
    ["sort_menu_by"]=>
    string(5) "label"
    ["delete_pages"]=>
    int(0)
    ["in_block"]=>
    int(1)
    ["show_hits"]=>
    int(1)
    ["show_date"]=>
    int(1)
    ["filter_html"]=>
    int(0)
    ["censor"]=>
    int(1)
    ["default_permissions"]=>
    array(4) {
      [0]=>
      int(3)
      [1]=>
      int(2)
      [2]=>
      int(2)
      [3]=>
      int(2)
    }
  }
  ["LANG_STATIC"]=>
  &array(75) {
    ["newpage"]=>
    string(8) "New Page"
    ["adminhome"]=>
    string(10) "Admin Home"
    ["staticpages"]=>
    string(12) "Static Pages"
    ["staticpageeditor"]=>
    string(18) "Static Page Editor"
    ["writtenby"]=>
    string(10) "Written By"
    ["date"]=>
    string(12) "Last Updated"
    ["title"]=>
    string(5) "Title"
    ["content"]=>
    string(7) "Content"
    ["hits"]=>
    string(4) "Hits"
    ["staticpagelist"]=>
    string(16) "Static Page List"
    ["url"]=>
    string(3) "URL"
    ["edit"]=>
    string(4) "Edit"
    ["lastupdated"]=>
    string(12) "Last Updated"
    ["pageformat"]=>
    string(11) "Page Format"
    ["leftrightblocks"]=>
    string(19) "Left & Right Blocks"
    ["blankpage"]=>
    string(10) "Blank Page"
    ["noblocks"]=>
    string(9) "No Blocks"
    ["leftblocks"]=>
    string(11) "Left Blocks"
    ["addtomenu"]=>
    string(11) "Add To Menu"
    ["label"]=>
    string(5) "Label"
    ["nopages"]=>
    string(37) "No static pages are in the system yet"
    ["save"]=>
    string(4) "save"
    ["preview"]=>
    string(7) "preview"
    ["delete"]=>
    string(6) "delete"
    ["cancel"]=>
    string(6) "cancel"
    ["access_denied"]=>
    string(13) "Access Denied"
    ["access_denied_msg"]=>
    string(149) "You are illegally trying access one of the Static Pages administration pages.  Please note that all attempts to illegally access this page are logged"
    ["all_html_allowed"]=>
    string(19) "All HTML is allowed"
    ["results"]=>
    string(20) "Static Pages Results"
    ["author"]=>
    string(6) "Author"
    ["no_title_or_content"]=>
    string(69) "You must at least fill in the <b>Title</b> and <b>Content</b> fields."
    ["no_such_page_anon"]=>
    string(15) "Please log in.."
    ["no_page_access_msg"]=>
    string(215) "This could be because you're not logged in, or not a member of Geeklog Site. Please <a href="http://cherokee.point2this.com//users.php?mode=new"> become a member</a> of Geeklog Site to receive full membership access"
    ["php_msg"]=>
    string(5) "PHP: "
    ["php_warn"]=>
    string(95) "Warning: PHP code in your page will be evaluated if you enable this option. Use with caution !!"
    ["exit_msg"]=>
    string(11) "Exit Type: "
    ["exit_info"]=>
    string(90) "Enable for Login Required Message.  Leave unchecked for normal security check and message."
    ["deny_msg"]=>
    string(113) "Access to this page is denied.  Either the page has been moved/removed or you do not have sufficient permissions."
    ["stats_headline"]=>
    string(20) "Top Ten Static Pages"
    ["stats_page_title"]=>
    string(10) "Page Title"
    ["stats_hits"]=>
    string(4) "Hits"
    ["stats_no_hits"]=>
    string(86) "It appears that there are no static pages on this site or no one has ever viewed them."
    ["id"]=>
    string(2) "ID"
    ["duplicate_id"]=>
    string(82) "The ID you chose for this static page is already in use. Please select another ID."
    ["instructions"]=>
    string(266) "To modify or delete a static page, click on that page's edit icon below. To view a static page, click on the title of the page you wish to view. To create a new static page, click on "Create New" above. Click on on the copy icon to create a copy of an existing page."
    ["centerblock"]=>
    string(13) "Centerblock: "
    ["centerblock_msg"]=>
    string(85) "When checked, this Static Page will be displayed as a center block on the index page."
    ["topic"]=>
    string(7) "Topic: "
    ["position"]=>
    string(10) "Position: "
    ["all_topics"]=>
    string(3) "All"
    ["no_topic"]=>
    string(13) "Homepage Only"
    ["position_top"]=>
    string(11) "Top Of Page"
    ["position_feat"]=>
    string(20) "After Featured Story"
    ["position_bottom"]=>
    string(14) "Bottom Of Page"
    ["position_entire"]=>
    string(11) "Entire Page"
    ["head_centerblock"]=>
    string(11) "Centerblock"
    ["centerblock_no"]=>
    string(2) "No"
    ["centerblock_top"]=>
    string(3) "Top"
    ["centerblock_feat"]=>
    string(11) "Feat. Story"
    ["centerblock_bottom"]=>
    string(6) "Bottom"
    ["centerblock_entire"]=>
    string(11) "Entire Page"
    ["inblock_msg"]=>
    string(12) "In a block: "
    ["inblock_info"]=>
    string(28) "Wrap Static Page in a block."
    ["title_edit"]=>
    string(9) "Edit page"
    ["title_copy"]=>
    string(24) "Make a copy of this page"
    ["title_display"]=>
    string(12) "Display page"
    ["select_php_none"]=>
    string(18) "do not execute PHP"
    ["select_php_return"]=>
    string(20) "execute PHP (return)"
    ["select_php_free"]=>
    string(11) "execute PHP"
    ["php_not_activated"]=>
    string(162) "The use of PHP in static pages is not activated. Please see the <a href="http://cherokee.point2this.com//docs/staticpages.html#php">documentation</a> for details."
    ["printable_format"]=>
    string(16) "Printable Format"
    ["copy"]=>
    string(4) "Copy"
    ["limit_results"]=>
    string(13) "Limit Results"
    ["search"]=>
    string(6) "Search"
    ["submit"]=>
    string(6) "Submit"
  }
  ["retval"]=>
  string(0) ""
}

(This text is only displayed to users in the group 'Root')
 Quote

ironmax

Anonymous
The code I supplied was meant to just be place in a file on its own with the php extension. Place the file in the public_html dir and call it up in your browser and it should work fine. See the file at work here http://www.spacequad.com/kbalertz.php Normally there would be bullet points for each article, but I removed them for a side block and the same tag affects this layout. So you'll have to play with the list tags in the CSS to fix it.


Michael
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
I almost have my code to work!!!
But it's putting a line/border on the end of each table.
How do I get that out?
It's that the table doing it it's the PHP code.

Text Formatted Code
?>
        <table cellspacing="1" cellpadding="10" width="100%" align="center" summary="" border="1">
            <tbody>
                <tr>
                    <td>
<?php
global $_TABLES;

$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (25)");
while ($row = DB_fetchArray($res)) {
        $display1 .= COM_formatBlock($row);
}

echo $display1;
?>
                   </td>
                    <td>
<?php
$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (24)");
while ($row = DB_fetchArray($res)) {
        $display2 .= COM_formatBlock($row);
}

echo $display2;
?>
               </td>
                    <td>
<?php
$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (24)");
while ($row = DB_fetchArray($res)) {
        $display3 .= COM_formatBlock($row);
}

echo $display3;
?>
               </td>

                </tr>
            </tbody>
        </table>
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
I almost have my code to work!!!
But it's putting a line/border on the end of each table.
How do I get that out?
It's NOT the table doing it it's the PHP code.

Text Formatted Code
?>
        <table cellspacing="1" cellpadding="10" width="100%" align="center" summary="" border="1">
            <tbody>
                <tr>
                    <td>
<?php
global $_TABLES;

$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (25)");
while ($row = DB_fetchArray($res)) {
        $display1 .= COM_formatBlock($row);
}

echo $display1;
?>
                   </td>
                    <td>
<?php
$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (24)");
while ($row = DB_fetchArray($res)) {
        $display2 .= COM_formatBlock($row);
}

echo $display2;
?>
               </td>
                    <td>
<?php
$res = DB_query("SELECT * from {$_TABLES['blocks']} WHERE bid in (24)");
while ($row = DB_fetchArray($res)) {
        $display3 .= COM_formatBlock($row);
}

echo $display3;
?>
               </td>

                </tr>
            </tbody>
        </table>


Can somone please help me?
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
It's most likely this:

border="1">
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
I want the table border. it's a line inside the table. See the screenshot.
http://www.freakworld.com/albums/Freak-s-Pics/badline.jpg
 Quote

ironmax

Anonymous
Quote by: Mikez

I want the table border. it's a line inside the table. See the screenshot.
http://www.freakworld.com/albums/Freak-s-Pics/badline.jpg



Have you tried to set the border="0" to verify that the problem still exist after that? If the problem goes away and you still need that line, then try some CSS to fix it up.

Michael
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
I know were it comes from.
formatBlock is pulling up the code for some blocks.
What I don't know is how to take out formatBlock with out breaking the code.
The part in the CSS file that it is calling up "block-divider"will also change other themes that need the line.
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
:banghead:
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
:banghead:
 Quote

Status: offline

jmucchiello

Forum User
Full Member
Registered: 08/29/05
Posts: 985
Oh, that line is the div class="block-divider" in blockfooter.thtml. It is called from COM_endBlock if your blocks do not have $_BLOCK_TEMPLATE entries. I know this is confusing but what you want is to add this (probably in your lib-custom.php):
Text Formatted Code

$_BLOCK_TEMPLATE['thenameofblockwithid24'] = "blockheader.thtml','blockfooter-empty.thtml";
$_BLOCK_TEMPLATE['thenameofblockwithid25'] = "blockheader.thtml','blockfooter-empty.thtml";

And then create blockfooter-empty.thtml in your layout/theme directory containing just a close div:

</div>

 
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
I'm back to this code.
I tried putting the
Text Formatted Code

$_BLOCK_TEMPLATE['tribalcouncil16'] = "blockheader.thtml','blockfooter-empty.thtml";
$_BLOCK_TEMPLATE['communitywebsite15'] = "blockheader.thtml','blockfooter-empty.thtml";
$_BLOCK_TEMPLATE['generalnews14'] = "blockheader.thtml','blockfooter-empty.thtml";
$_BLOCK_TEMPLATE['cherokeeschools14'] = "blockheader.thtml','blockfooter-empty.thtml";
 


lib-custom and drooping blockfooter-empty.thtml with the /div in it. But still there.
How are you calling the code from the lib-custom.php?

I need that line out of there :banghead:
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by: Mikez

lib-custom


I didn't read the entire thread, but this code looks like it should go into your theme's functions.php, not into lib-custom.php

HTH

bye, Dirk
 Quote

Status: offline

Mikez

Forum User
Regular Poster
Registered: 06/17/05
Posts: 87
Got it!! I am going to repost what this will all do in a clean post because I have seen a lot of people that want to do this.
 Quote

All times are EST. The time is now 08:03 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content