Page 1 of 1
CGBlog setup [solved]
Posted: Wed May 16, 2018 8:43 pm
by master3395
I wonder if anyone knows why CGBlog can't show articles, on any themes.
I've tried with the default cms themes, but I've not got ANY of my published news on a content page.
I've tried both codes below, but 0 showing on the front page.
BUT if i enable "show all regardless of status", they show all.
Picture below:
https://newstargeted.com/uploads/upload ... ba1b8b.png
https://newstargeted.com/newsmaster
The image below is showing how it's looking on the website:
https://newstargeted.com/uploads/upload ... 1d3711.png
{CGBlog}
{CGBlog number="3"}
Below is how CGBlog looks in the admin panel:
https://newstargeted.com/uploads/upload ... 4014d6.png
Below is how it looks in content page:
https://newstargeted.com/uploads/upload ... 567a0a.png
Re: CGBlog setup
Posted: Wed May 16, 2018 10:55 pm
by Rolf
At the content page, switch WYSIWYG off.
What is in the content text area?
Re: CGBlog setup
Posted: Wed May 16, 2018 10:59 pm
by master3395
The last "news number" is just to see the difference between CGBlog and News module.
Code: Select all
<!DOCTYPE html>
<__html>
<head>
</head>
</__body>
<p>Below is CGBlog</p>
<p>{CGBlog}</p>
<p>{CGBlog number="3"}</p>
<p>Below is News module.</p>
<p>{news number="3" summarytemplate="NewsMaster-news-summary"}</p>
<__body>
</__html>
Rolf wrote:At the content page, switch WYSIWYG off.
What is in the content text area?
Re: CGBlog setup
Posted: Wed May 16, 2018 11:28 pm
by Rolf
I asked what is in the *text area* of the content page after disabling WYSIWYG
Re: CGBlog setup
Posted: Thu May 17, 2018 7:54 am
by velden
I think you should REALLY start troubleshooting by:
- starting with a basic/sample PAGE template
- check your (PAGE) templates. If I take a look at the output (view source) of the webpage I notice it's not valid html (to say the least).
Note that CMSMS splits a page template into several sections (top, head, body) for processing.
Re: CGBlog setup
Posted: Thu May 17, 2018 4:25 pm
by master3395
Not sure if this is 100% correct, as you said "text area"
https://newstargeted.com/uploads/upload ... bede43.png
https://newstargeted.com/uploads/upload ... b7ec95.png
Below is my Template.
Code: Select all
{extends file='cms_template:NewsMasterHead'}
{block name='top-bar'}
<header>
<!-- Sub Navigation -->
<div class="top-bar">
<div class="top-bar-left">
<ul class="menu">
<a href="">
<img src="uploads/images/logo.png" alt="Logo">
</a>
{Navigator template="NewsMaster-menu"}
</ul>
</div>
<div class="top-bar-right">
<form id="m59d3bmoduleform_1" method="get" action="/search" class="cms_form">
<div class="hidden">
<input type="hidden" name="mact" value="Search,m59d3b,dosearch,0" />
<input type="hidden" name="m59d3breturnid" value="58" />
</div>
<label for="m59d3bsearchinput"></label><input type="text" class="search-input" id="m59d3bsearchinput" name="m59d3bsearchinput" size="20" maxlength="50" value="Enter Search..." onfocus="if(this.value==this.defaultValue) this.value='';" onblur="if(this.value=='') this.value=this.defaultValue;" />
<input class="search-button" name="submit" value="Submit" type="submit" />
<input type="hidden" id="borigreturnid" name="returnid" value="158" />
<input type="hidden" id="bdetailpage" name="bdetailpage" value="home" />
</form>
</ul>
</div>
</div>
<div class="title-bar" data-responsive-toggle="main-menu" data-hide-for="medium">
<button class="menu-icon" type="button" data-toggle></button>
<div class="title-bar-title">Menu</div>
</div>
<div class="top-bar" id="main-menu">
<ul class="menu vertical medium-horizontal expanded medium-text-center" data-responsive-menu="drilldown medium-dropdown">
<li class="has-submenu"><a href="#">Tech</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
</li>
<li class="has-submenu"><a href="#">Energy</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
</li>
<li class="has-submenu"><a href="#">Space</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
</li>
<li class="has-submenu"><a href="#">Medicine</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
</li>
<li class="has-submenu"><a href="#">Robotics</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
</li>
<li class="has-submenu"><a href="#">Tesla</a>
<ul class="submenu menu vertical" data-submenu>
<li><a href="#">One</a></li>
<li><a href="#">Two</a></li>
<li><a href="#">Three</a></li>
</ul>
</li>
</ul>
</div>
</header>
</__body{load_background rooturl={root_url}}>
{edit_floater}
{/block}
{block name='content'}
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<div class="row">
<div class="medium-8 columns">
<div class="row columns">
<div class="orbit" role="region" aria-label="Favorite Space Pictures" data-orbit>
<ul class="orbit-container">
<button class="orbit-previous" aria-label="previous"><span class="show-for-sr">Previous Slide</span>◀</button>
<button class="orbit-next" aria-label="next"><span class="show-for-sr">Next Slide</span>▶</button>
<li class="orbit-slide is-active">
<img src="uploads/images/gifs/giphy.gif">
</li>
<li class="orbit-slide">
<img src="uploads/images/gifs/reaction-Dr-Zoidberg.gif">
</li>
<li class="orbit-slide">
<img src="uploads/images/gifs/raw.gif">
</li>
<li class="orbit-slide">
<img src="uploads/images/gifs/Stupid-man-systom-error.gif">
</li>
<li class="orbit-slide">
<img src="uploads/images/png/RD450-front-with-callouts.png">
</li>
<li class="orbit-slide">
<img src="uploads/images/png/cloud-950.jpg">
</li>
<li class="orbit-slide">
<img src="https://placehold.it/1200x450">
</li>
</ul>
</div>
</div>
</div>
<div class="medium-4 columns">
<font color="black"><p class="lead">TRENDING POSTS</p></font>
{news summarytemplate="NewsMaster-news-summary-more" number="1"}
<font color="black"><p class="lead">TRENDING POSTS</p></font>
{news summarytemplate="NewsMaster-news-summary-more" number="1"}
</div>
</div>
<hr>
<div class="row column">
<h4 style="margin: 0;" class="text-center"> <font color="white">BREAKING NEWS</h4></font></li>
</div>
<hr>
<div class="row small-up-3 medium-up-4 large-up-5">
<div class="column">
<img src="https://placehold.it/400x370&text=Look at me!" alt="image for article">
</div>
<div class="column">
<img src="https://placehold.it/400x370&text=Look at me!" alt="image for article">
</div>
<div class="column">
<img src="https://placehold.it/400x370&text=Look at me!" alt="image for article">
</div>
<div class="column show-for-medium">
<img src="https://placehold.it/400x370&text=Look at me!" alt="image for article">
</div>
<div class="column show-for-large">
<img src="https://placehold.it/400x370&text=Look at me!" alt="image for article">
</div>
</div>
<hr>
<div class="row column">
<h4 style="margin: 0;" class="text-center"> <font color="white">LATEST STORIES</h4></font></li>
<hr>
<div class="row">
<div class="large-8 columns" style="border-right: 1px solid #E3E5E8;">
<article>
<main>
<div class="two-third-column maincontent">
{content assign=content}
{if $page_alias == 'home'}
{$content}
{else}
<div class="split-column form-size-content">
<h1>{title}</h1>
{$content}
</div>
{/if}
</div>
</article>
</div>
<div class="large-4 columns">
<aside>
<div class="three-column">
<div class="split-column sideblog">
{Widgets category='Announcements'}
</div>
{FormBuilder form='adsandnoads'}
{global_content name='NewsMaster-share' assign="shareblok"}
{if $shareblok|count_characters < 10}{else}
<div class="split-column search sideblog">
<h3>Like and share our site</h3>
<div class="likebutton">{$shareblok}</div>
</div>
{/if}
</div>
<div class="split-column sideblog">
{CGBlog action=browsecat summarytemplate=somesummary detailtemplate=somedetail detailpage=mydetailpage pagelimit=25 sortby=cgblog_extra sortorder=asc}
</div>
<div class="row column">
<font color="black"><p class="lead">TRENDING POSTS</p></font>
<div class="split-column sideblog">
{news summarytemplate="NewsMaster-news-summary-more" number="5"}
</div>
<div class="row column">
{FormBuilder form='adsandnoads'}
</div>
<div class="split-column search sideblog">
{$feu_userid = feu_smarty::get_current_userid()}
{if empty($feu_userid)}
<h3>Register & Login</h3>
<p>
<ul id="services-list">
<li>
<a href="register" class="image">
<img src="uploads/images/Account/Register/Registration_100.png" alt="Register" style="width:100px;height:100px;border:10; align="right">
</a>
<li>
</ul>
</p>
<ul id="services-list">
<li>
<a href="login" class="image">
<img src="uploads/images/Account/Login/Login_100.png" alt="Login" style="width:100px;height:100px;border:10; align="right">
</a>
<li>
</ul>
</p>
{else}
<h3>My Settings & Log Out</h3>
<p>
<ul id="services-list">
<li>
<a href="changesettings" class="image">
<img src="uploads/images/Account/Settings/Account_100.png" alt="Change Settings" style="width:100px;height:100px;border:0; align="right"">
</a>
<li>
</ul>
</p>
<ul id="services-list">
<li>
<a href="logs" class="image">
<img src="uploads/images/Account/Log/LOG_100.png" alt="Log" style="width:100px;height:100px;border:0; align="right"">
</a>
<li>
</ul>
</p>
<ul id="services-list">
<li>
<a href="log-out" class="image">
<img src="uploads/images/Account/Logout/Logout_Left_100.png" alt="Log out" style="width:100px;height:100px;border:0; align="right">
</a>
<li>
</ul>
</p>
{/if}
</div>
</aside>
</div>
</div>
<footer>
<div class="row expanded callout secondary">
<div class="large-4 columns">
<h5>SHARE</h5>
<div class="row small-up-4">
<div class="column"><a title="Terms of Service" href="terms"><img class="thumbnail" src="uploads/images/Share/Terms/Terms_64.png" alt="Terms of Service"></div>
<div class="column"><a title="Privacy Policy" href="privacy"><img class="thumbnail" src="uploads/images/Share/Privacy-Policy/Privacy-Policy-64.png" alt="Privacy Policy"></div>
<div class="column"><a title="jobs" href="jobs"><img class="thumbnail" src="uploads/images/Share/Jobs/Jobs_64.png" alt="Jobs"></div>
<div class="column"><a title="contact-us" href="contact-us"><img class="thumbnail" src="uploads/images/Share/Contact-Us/Contact-Us-64.png" alt="Contact Us"></div>
<div class="column"><a title="Facebook" href="https://www.facebook.com/newstargeted/"><img class="thumbnail" src="uploads/images/Share/Facebook/icons8-Facebook_64.png" alt="Facebook"></div>
<div class="column"><a title="Twitter" href="https://twitter.com/newstargeted1"><img class="thumbnail" src="uploads/images/Share/Twitter/icons8-Twitter_64.png" alt="Twitter"></div>
<div class="column"><a title="Discord" href="https://discordapp.com/invite/KnQMpF?utm_source=Discord%20Widget&utm_medium=Connect]Discord"><img class="thumbnail" src="uploads/images/Share/Discord/icons8-Discord_64.png" alt="Discord"></div>
<div class="column"><a title="Image" href=""><img class="thumbnail" src="uploads/icon-76x76.png" alt="NewsTargeted"></div>
<div class="column"><a title="Youtube" href="https://www.youtube.com/user/master33951"><img class="thumbnail" src="uploads/images/Share/Youtube/icons8-YouTube_64.png" alt="Youtube"></div>
<div class="column"><a title="WebPush" href="webpush"><img class="thumbnail" src="uploads/images/Share/WebPush/WebPush-64x64.png" alt="WebPush"></div>
<div class="column"><a title="Google Plus" href="https://plus.google.com/u/1/100456392683626413603"><img class="thumbnail" src="uploads/images/Share/Google-Plus/icons8-Google-Plus-64.png" alt="Google Plus"></div>
<div class="column"><a title="Newsletter" href="newsletter"><img class="thumbnail" src="uploads/images/Share/News/icons8-News_64.png" alt="Newsletter"></div>
</a>
</div>
</div>
<div class="large-4 columns">
<h5>News Targeted</h5>
<p>NewsTargeted is a publication dedicated to bringing the latest news about copyright, privacy, and everything related to filesharing and IT News.</p>
</div>
<div class="large-4 columns">
<h5>Copyright © 2014-{$smarty.now|date_format:'%Y'} News Targeted</h5>
<p>This website is proudly powered by CMS Made Simple™ {cms_version} {cms_versionname}</p>
</div>
<p style="color: black; text-align: right;"><span style="color: #;">Sponsored hosting by <a style="color: #;" href="https://goingrogue.io/order/aff.php?aff=1">GoingRogue.io</a></span></p>
</footer>
{Disqus action='counter'}
{/block}
Rolf wrote:I asked what is in the *text area* of the content page after disabling WYSIWYG
Re: CGBlog setup
Posted: Fri May 18, 2018 7:10 am
by Rolf
Why do you have the <__html <head </__body stuff in the textarea??? This should be in the core Page template!
The page text area should only contain the CGBlog module tag, etc.
Re: CGBlog setup
Posted: Fri May 18, 2018 10:34 am
by master3395
The html part comes from a module called tinymce
Re: CGBlog setup
Posted: Fri May 18, 2018 11:07 am
by Rolf
Well, it shouldn't be there!!
Let WYSIWYG off, remove the redundant code and try again.
Re: CGBlog setup
Posted: Fri May 18, 2018 2:55 pm
by master3395
I removed the code, and turned it off.
Still no output on the front end.
Unless i turn on "show all regardless of status".
Rolf wrote:Well, it shouldn't be there!!
Let WYSIWYG off, remove the redundant code and try again.
Re: CGBlog setup
Posted: Fri May 18, 2018 5:32 pm
by Jo Morg
Although the module's help is not clear about this keep in mind that, usually, in Smarty anything enclosed in double quotes is treated as a string and evaluated as a Smarty template. This has two effects:
- it slows down processing: it may not be noticeable on a single instance but given a loop or a high number of occurrences it will be;
- "FALSE" is not the same as FALSE: the first will be a string the other a Boolean. Numbers enclosed in quotes (whether double or not) may not be evaluated as numbers so "3" may not be the same as 3;
This also depends on the way the module handles the values internally. A few rules of thumb:
- use single quotes for text values unless you want the evaluated by Smarty;
- use double quotes for values you want evaluated by Smarty;
- don't use quotes for integers;
So... try {CGBlog number=3} . If that doesn't work you surelly have bigger problems to solve.
Re: CGBlog setup
Posted: Sat May 19, 2018 8:04 pm
by master3395
Thanks Rolf and Jo Morg, i figured out my issue...
I had enabled something i should not have done...
The button i activated is below, and it removed all active, and only showed expired...
Code: Select all
"Show Archived Articles:
If enabled, only articles that have expired and would not normally show are displayed. This option is ignored if showall is selected"
Re: CGBlog setup
Posted: Sat May 19, 2018 9:22 pm
by master3395
I can't make the first post say [Solved]
As i can't edit it anymore.