, Guest!
Already a Member? Login or Register.

Menu



Showcase


Due to the volume of spam happening on our forums, posting is now restricted to verified members only.  If you're not verified, drop us a note with your username.

Home > FlexCMS Support Forum > User Help > General Support Requests > Block is not showing

FlexCMS Support Forum


Block is not showing
Started April 18, 2007 @ 10:08am by brendanrehman
Post Message 
brendanrehman


Posts: 9
 
Block is not showingApril 18, 2007 @ 10:08am
I tried the following snippet from the snippets sections and my block just does not show up. I've set all the properties to visible and allows all users to view the block...

$ArticlesCount = '5';
$CategoriesList = '0';

$TeaserLength = 100;

// ========================

$ArticlesCode = '';
$ArticlesPrinted = 0;






if (strpos($ArticlesCount,',') !== false) {
list($ACOffset,$ACCount) = explode(',',$ArticlesCount);
$LimitString = intval($ACOffset).','.intval($ACCount);
}
else {
$LimitString = intval($ArticlesCount);
}

if ($CategoriesList != '') {

$CategoriesArray = explode(',',$CategoriesList);
for ($i = 0; $i < count($CategoriesArray); $i++) {
$CategoriesArray[$i] = intval($CategoriesArray[$i]);
}
$CategoriesList2 = implode(',',$CategoriesArray);

$query_na = "SELECT * FROM `".$Settings['DBPrefix']."na-Articles` WHERE ApprovedBy!='' AND Category IN (".$CategoriesList2.") ORDER BY DateCode DESC LIMIT ".$LimitString;
}
else {
$query_na = "SELECT * FROM `".$Settings['DBPrefix']."na-Articles` WHERE ApprovedBy!='' ORDER BY DateCode DESC LIMIT ".$LimitString;
}

$result_na = mysql_query($query_na) or die (mysql_error());
while ($row_na = mysql_fetch_array($result_na)) {

if ($row_na['Teaser'] == '') {
$StrippedArticle = strip_tags($row_na['Article']);

if (strlen($StrippedArticle) > $TeaserLength) {
$TeaserSection = substr($StrippedArticle,0,$TeaserLength);
while (substr($TeaserSection,strlen($TeaserSection)-1,1) != ' ') {
$TeaserSection = substr($TeaserSection,0,strlen($TeaserSection)-1);
}
while (substr($TeaserSection,strlen($TeaserSection)-1,1) == ' ') {
$TeaserSection = substr($TeaserSection,0,strlen($TeaserSection)-1);
}

$TeaserSection .= '... <font size="1">[<a href="'.$MainURL.'/articles/view/'.$row_na['RecordNumber'].'.html">'.$MsgText[7][78].'</a>]</font>';
$row_na['Title'] = '<a href="'.$MainURL.'/articles/view/'.$row_na['RecordNumber'].'.html">'.$row_na['Title'].'</a>';
$ArticleLinked = 'y';
}
else {
$TeaserSection = $StrippedArticle;
}
}
else {
$TeaserSection = substr($row_na['Teaser'],0,$TeaserLength);

if (strlen($row_na['Teaser']) > strlen($TeaserSection)) {
while (substr($TeaserSection,strlen($TeaserSection)-1,1) != ' ') {
$TeaserSection = substr($TeaserSection,0,strlen($TeaserSection)-1);
}
while (substr($TeaserSection,strlen($TeaserSection)-1,1) == ' ') {
$TeaserSection = substr($TeaserSection,0,strlen($TeaserSection)-1);
}
}

$TeaserSection .= '... <font size="1">[<a href="'.$MainURL.'/articles/view/'.$row_na['RecordNumber'].'.html">'.$MsgText[7][78].'</a>]</font>';
$row_na['Title'] = '<a href="'.$MainURL.'/articles/view/'.$row_na['RecordNumber'].'.html">'.$row_na['Title'].'</a>';
$ArticleLinked = 'y';
}


$ArticlesPrinted++;

if ($ArticlesCode != '') {
$ArticlesCode .= '<br><br>';
}

$ArticlesCode .= '<b>'.$row_na['Title'].'</b><br>'.$TeaserSection;




} // end while rows loop


print $ArticlesCode;
 
otter
Administrator



Posts: 177
 
April 18, 2007 @ 11:05am
Hi Brendan,

I don't know of any issues with this code and just pasted it into our demo and it seems to be working fine there.

I'd be happy to look at your site for you, but need the URL and admin access. Please DO NOT post this info here, rather send an email with this information to support@flexcms.com

Thanks!

otter


ONLINE TRAINING CLASSES FOR FLEXCMS IN MAY: FlexCMS Basics (101), Sat., May, 15, 2010 & FlexCMS Blocks (Mon., May 10, 2010).
 
brendanrehman


Posts: 9
 
Block is not showingApril 18, 2007 @ 11:10am
Ok I re-created it and the following error now shows up...

Parse error: parse error in C:\Inetpub\vhosts\mysite.com\httpdocs\index.php(3166) : eval()'d code on line 1
 
otter
Administrator



Posts: 177
 
April 18, 2007 @ 2:32pm
Hi Brendan,

We received your info via our support email and will assist you further via your support ticket.

Thanks!

otter


ONLINE TRAINING CLASSES FOR FLEXCMS IN MAY: FlexCMS Basics (101), Sat., May, 15, 2010 & FlexCMS Blocks (Mon., May 10, 2010).
 

Post Message 




Try & Buy FeedForAll - Easy to use RSS Feed Creator - great for iTunes users!

MEMBERS




All Contents, Code, Scripts and Technologies Copyright 2003-2009 FlexCMS.
All Rights Reserved. Software License Agreement

Processing Time: 0.07708 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS