, 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 > Recent Messages

FlexCMS Support Forum


Recent Messages

Previous Page Next Page

User Help > General Support Requests > Printer Friendly with Images (Go To Message)
Grady
 
Printer Friendly with ImagesJuly 29, 2008 @ 5:22pm
Is it possible to change the settings to allow images to print in printer friendly versions of pages? If so, how is that done?
User Help > Code Snippets > Creating an RSS Feed from your FlexCMS News/Articles (Go To Message)
h
 
rss pageJuly 26, 2008 @ 4:07am
i still have no idea why the page creation won't work, but I believe that it has to be an issue with my hosts configuration.

I can, however, save this as a page in my flex folder and it works beautifully.
(for others: just remember to add the <?php.....?> tags in the saved rss.php if you copy and paste the above code)
cheers,
heather
User Help > Code Snippets > Creating an RSS Feed from your FlexCMS News/Articles (Go To Message)
DCSun
 
July 25, 2008 @ 8:30pm
H,

I wasn't able to duplicate your problem. That code works perfectly on the site I tested it on without any error messages saving/creating the page or running the code.


David
User Help > Code Snippets > Creating an RSS Feed from your FlexCMS News/Articles (Go To Message)
h
 
error only for this code on page creationJuly 24, 2008 @ 11:39pm
hallo! trying out some snippets that may come in handy while i am still running a demo. after making a new page and inserting this code i get:
You don't have permission to access /index.php/admin/pages-edit-save on this server.

which is odd because i can make other pages no problem, though i am not sure if i have any php enabled pages

i am still a beginner with php and cannot figure out why this is not a functioning snippet for me.
User Help > General Support Requests > Adding "by Author" link in Article (Go To Message)
DCSun
 
July 24, 2008 @ 4:33pm
Grady,

I don't think there's any way to automate it, those were just entered by hand in the subtitle field when the articles were created.

The page for each author can be done with articles categories.


David
User Help > General Support Requests > Menu Block Feature Articles (Go To Message)
DCSun
 
July 24, 2008 @ 4:31pm
You've got a couple options.

You can use this code: http://www.flexcms.com/index.php/forum/11/128.html for a basic one (I think that's on SECWB site), or this: http://www.flexcms.com/index.php/forum/6/202.html (for the same options as the pages version).


David
User Help > General Support Requests > ARTICLES FORMATS (Go To Message)
h
 
articles solutionJuly 24, 2008 @ 4:27pm
yep, php enable was source of problem for page insert.

thanks for the how to on the block ...and now i know to "steal code" when needed.

cannot thank you enough. 1 virtual chocolate cake for you!
User Help > General Support Requests > ARTICLES FORMATS (Go To Message)
DCSun
 
July 24, 2008 @ 4:20pm
The code you got from the Add Articles To Page form should work fine in a page, but it does not work in blocks. To use it in a page, simply paste that in wherever you'd like them to appear. Make sure PHP is not enabled on the section you've added that to, it sounds like that may have been the cause of your errors.

To add them to a block, you can cheat and use the code from FlexCMS directly in your block:

Code

if ($IM['na'] == 'y') {

$query_na = "select * from `".$Settings['DBPrefix']."na-Settings`";
$result_na = mysql_query($query_na) or die (mysql_error());
while ($row_na = mysql_fetch_array($result_na)) {
$naSettings[$row_na['Name']] = $row_na['Value'];
}

function AddArticles2($StyleCode,$ArticlesCount,$CategoriesList) {
Global $Settings, $MainURL, $ImagesURL, $naSettings, $FontFace, $FontSize, $MsgText;

$ArticlesCode = '';
$ArticlesPrinted = 0;


if ($StyleCode == 1 || $StyleCode == 2 || $StyleCode == 3 || $StyleCode == 4) {
$ArticlesCode = '<table width="100%" border="0" cellpadding="3" cellspacing="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.") OR Category2 IN (".$CategoriesList2.") OR Category3 IN (".$CategoriesList2.") OR Category4 IN (".$CategoriesList2.") OR Category5 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 ($StyleCode == 1) {

if ($ArticlesPrinted > 0) {
$ArticlesCode .= '<tr><td colspan="2"><img src="'.$ImagesURL.'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
}


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

if (strlen($StrippedArticle) > $naSettings['TeaserLength']) {
$TeaserSection = substr($StrippedArticle,0,$naSettings['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 = $row_na['Article'];
}
}
else {
$TeaserSection = substr($row_na['Teaser'],0,$naSettings['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';
}




if ($row_na['Image'] != '' && $row_na['ImageType'] > 0) {
$TypeExtensions[1] = '-thumb.gif';
$TypeExtensions[2] = '-thumb.jpg';
$TypeExtensions[3] = '-thumb.png';

if ($ArticleLinked == 'y') {
$PhotoStuff = '<a href="'.$MainURL.'/articles/view/'.$row_na['RecordNumber'].'.html"><img src="'.$ImagesURL.'/articles/'.$row_na['Image'].$TypeExtensions[$row_na['ImageType']].'" alt="" border="0"></a>';
}
else {
$PhotoStuff = '<img src="'.$ImagesURL.'/articles/'.$row_na['Image'].$TypeExtensions[$row_na['ImageType']].'" alt="" border="0">';
}
}
else {
$PhotoStuff = '<img src="'.$ImagesURL.'/spacer.gif" width="1" height="1" alt="" border="0">';
}

$ArticlesPrinted++;
$ArticlesCode .= '<tr><td width="90%"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$row_na['Title'].'</b><br>'.$TeaserSection.'</td><td width="10%" align="center">'.$PhotoStuff.'</td></tr>';
} // end if style 1

else if ($StyleCode == 2) {

if ($ArticlesPrinted > 0) {
$ArticlesCode .= '<tr><td colspan="2"><img src="'.$ImagesURL.'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
}


if ($row_na['Teaser'] == '') {
$StrippedArticle = strip_tags($row_na['Article']);
$TeaserSection = substr($StrippedArticle,0,$naSettings['TeaserLength']);

if (strlen($StrippedArticle) > $naSettings['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 = substr($row_na['Teaser'],0,$naSettings['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';
}




if ($row_na['Image'] != '' && $row_na['ImageType'] > 0) {
$TypeExtensions[1] = '-thumb.gif';
$TypeExtensions[2] = '-thumb.jpg';
$TypeExtensions[3] = '-thumb.png';

if ($ArticleLinked == 'y') {
$PhotoStuff = '<a href="'.$MainURL.'/articles/view/'.$row_na['RecordNumber'].'.html"><img src="'.$ImagesURL.'/articles/'.$row_na['Image'].$TypeExtensions[$row_na['ImageType']].'" alt="" border="0"></a>';
}
else {
$PhotoStuff = '<img src="'.$ImagesURL.'/articles/'.$row_na['Image'].$TypeExtensions[$row_na['ImageType']].'" alt="" border="0">';
}
}
else {
$PhotoStuff = '<img src="'.$ImagesURL.'/spacer.gif" width="1" height="1" alt="" border="0">';
}

$ArticlesPrinted++;
$ArticlesCode .= '<tr><td width="10%" align="center">'.$PhotoStuff.'</td><td width="90%"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$row_na['Title'].'</b><br>'.$TeaserSection.'</td></tr>';
} // end if style 2

else if ($StyleCode == 3) {

if ($ArticlesPrinted > 0) {
$ArticlesCode .= '<tr><td colspan="2"><img src="'.$ImagesURL.'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
}


if ($row_na['Teaser'] == '') {
$StrippedArticle = strip_tags($row_na['Article']);
$TeaserSection = substr($StrippedArticle,0,$naSettings['TeaserLength']);

if (strlen($StrippedArticle) > $naSettings['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 = substr($row_na['Teaser'],0,$naSettings['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';
}




if ($row_na['Image'] != '' && $row_na['ImageType'] > 0) {
$TypeExtensions[1] = '.gif';
$TypeExtensions[2] = '.jpg';
$TypeExtensions[3] = '.png';

if ($ArticleLinked == 'y') {
$PhotoStuff = '<a href="'.$MainURL.'/articles/view/'.$row_na['RecordNumber'].'.html"><img src="'.$ImagesURL.'/articles/'.$row_na['Image'].$TypeExtensions[$row_na['ImageType']].'" alt="" border="0"></a>';
}
else {
$PhotoStuff = '<img src="'.$ImagesURL.'/articles/'.$row_na['Image'].$TypeExtensions[$row_na['ImageType']].'" alt="" border="0">';
}
}
else {
$PhotoStuff = '<img src="'.$ImagesURL.'/spacer.gif" width="1" height="1" alt="" border="0">';
}

$ArticlesPrinted++;
$ArticlesCode .= '<tr><td width="90%" valign="top"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$row_na['Title'].'</b><br>'.$TeaserSection.'</td><td width="10%" align="center">'.$PhotoStuff.'</td></tr>';
} // end if style 3

else if ($StyleCode == 4) {

if ($ArticlesPrinted > 0) {
$ArticlesCode .= '<tr><td colspan="2"><img src="'.$ImagesURL.'/spacer.gif" width="1" height="1" alt="" border="0"></td></tr>';
}


if ($row_na['Teaser'] == '') {
$StrippedArticle = strip_tags($row_na['Article']);
$TeaserSection = substr($StrippedArticle,0,$naSettings['TeaserLength']);

if (strlen($StrippedArticle) > $naSettings['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 = substr($row_na['Teaser'],0,$naSettings['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';
}




if ($row_na['Image'] != '' && $row_na['ImageType'] > 0) {
$TypeExtensions[1] = '.gif';
$TypeExtensions[2] = '.jpg';
$TypeExtensions[3] = '.png';

if ($ArticleLinked == 'y') {
$PhotoStuff = '<a href="'.$MainURL.'/articles/view/'.$row_na['RecordNumber'].'.html"><img src="'.$ImagesURL.'/articles/'.$row_na['Image'].$TypeExtensions[$row_na['ImageType']].'" alt="" border="0"></a>';
}
else {
$PhotoStuff = '<img src="'.$ImagesURL.'/articles/'.$row_na['Image'].$TypeExtensions[$row_na['ImageType']].'" alt="" border="0">';
}
}
else {
$PhotoStuff = '<img src="'.$ImagesURL.'/spacer.gif" width="1" height="1" alt="" border="0">';
}

$ArticlesPrinted++;
$ArticlesCode .= '<tr><td width="10%" align="center">'.$PhotoStuff.'</td><td width="90%" valign="top"><font face="'.$FontFace.'" size="'.$FontSize.'"><b>'.$row_na['Title'].'</b><br>'.$TeaserSection.'</td></tr>';
} // end if style 4



} // end while rows loop


if ($StyleCode == 1 || $StyleCode == 2 || $StyleCode == 3 || $StyleCode == 4) {
$ArticlesCode .= '</table>';
}


return $ArticlesCode;
}


print AddArticles2('1','0,3','');



}





Modify this line: "print AddArticles2('1','0,5','');" to match your "{FlexCMS-Articles|1|0,5|}" tag (the three sections at the end)

That would of course be PHP enabled.


David
User Help > General Support Requests > ARTICLES FORMATS (Go To Message)
h
 
error in placing articles in pagesJuly 24, 2008 @ 4:05pm
I would like to use the add articles to a page feature in a custom block. I added the provided code from the article manager into my custom block:
{FlexCMS-Articles|1|0,5|}

I enabled the functions and then received the error about unexpected ","

I also set this same code into the index page to test it out, but rec'd the following error:
Parse error: syntax error, unexpected T_STRING in /data/home/vfcweb/websites/vfcboard.vancouverfood.coop/docs/index.php(1736) : eval()'d code on line 1

this is a dmeo site and will go live when i can get these glitches ironed out! any help is really appreciated.
User Help > General Support Requests > Adding "by Author" link in Article (Go To Message)
Grady
 
Adding "by Author" link in ArticleJuly 23, 2008 @ 8:31am
How did you add the "by Author" link to the article template such as what is located at http://www.secwb.com/index.php/articles/view/369.html.

Also, does FlexCMS automatically create a page of article for each author such as what is at http://www.secwb.com/index.php/articles/19.html? If not, how was that done?

Thank you, Grady

Previous Page Next Page





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.14572 seconds.
 
Management Login

Powered By FlexCMS
Powered By FlexCMS