Advancednews in 2 columns

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
oldnema
Posts: 265
Joined: Wed Jan 21, 2009 5:15 pm
Location: Czech Republic
Contact:

Advancednews in 2 columns

Post by oldnema » Wed Jul 15, 2009 8:57 am

Can somebody help me with this? I would like to show advanced news in two columns. But I don't know where and what to change. Is this possible at all? I use the latest free version of this plugin. Or is there any replacement for this plugin that vould me to show the news the way I would like it?
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: Advancednews in 2 columns

Post by mvwd » Wed Jul 22, 2009 1:52 pm

You can adjust the newsbox-width via CSS. Goto: CMSimple-Admin -> plugins -> Advancednews -> Plugin-Stylesheet and search for:

Code: Select all

.show_news_box{
  margin: 10px 0px 0px 0px;
  width:100%;
}
....replace it with sometihng like that:

Code: Select all

.show_news_box{
  margin: 10px 0px 0px 0px;
  width:49%;
  float:left;
}
This will shrink the boxes to half of content-width an collapse all available boxes into two columns.
The only thing to know: The order, the news are arranged is the newest on top left, the second on the right. The third and fourth news will be displayed in the second row ond so on...

mvwd.

oldnema
Posts: 265
Joined: Wed Jan 21, 2009 5:15 pm
Location: Czech Republic
Contact:

Re: Advancednews in 2 columns

Post by oldnema » Wed Jul 22, 2009 5:17 pm

Sorry for English, I use translator.
I know that it must change the CSS and the same solution I also came. The problem is that when I see read more column is wide, only 45%. I wanted to edit index.php but unfortunately it is encrypted :(
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: Advancednews in 2 columns

Post by mvwd » Wed Jul 22, 2009 8:27 pm

...sorry, i didn't understand your post. Maybe your translator made something wrong...
Eventually this helps:

Code: Select all

.show_news_box{
  margin: 10px 0px 0px 0px;
  width:200px;
  float:left;
}
? Do you know, where to put this CSS-code?
mvwd.

oldnema
Posts: 265
Joined: Wed Jan 21, 2009 5:15 pm
Location: Czech Republic
Contact:

Re: Advancednews in 2 columns

Post by oldnema » Thu Jul 23, 2009 4:40 am

I used this code that the but cannot work:

Code: Select all

.show_news_box
{
   border: 1px solid #D8D8D8;
   margin-right: 5px;
   margin-left: 5px;
   float: left;
   width: 45%;
   padding: 5px;
   margin-bottom: 10px;
   background-color: #ffffff;
}

First side is OK (screen1) -http://oldnema.compsys.cz/front_page.jpg

"Read more" is error, because in index.php is need add for example:

Code: Select all

.show_news_box2{
  margin: 10px 0px 0px 0px;
  float:left;
}
Sreen page "Read More" http://oldnema.compsys.cz/read_more.jpg

Do you get me?

Please Tata translate :oops:

Asi si nerozumíme. Nemůžu použít v CSS show_news_box o šířce sloupců například 45%, protože má pak šířku 45% i strana "Read more". Proto je potřeba přidat do strany index.php (která je ale zakodovaná!!) ještě jeden tag - například:

Code: Select all

.show_news_box2{
  margin: 10px 0px 0px 0px;
  float:left;
}
aby se pak strana "Read more" mohla zobrazit na šířku 100%.

Teď už mi rozumíte co potřebuji??
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates

Tata
Posts: 3068
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Advancednews in 2 columns

Post by Tata » Thu Jul 23, 2009 5:43 am

oldnema wrote:Please Tata translate :oops:
Well, the point is that:
IF I use

Code: Select all

.show_news_box
{
   border: 1px solid #D8D8D8;
   margin-right: 5px;
   margin-left: 5px;
   float: left;
   width: 45%;
   padding: 5px;
   margin-bottom: 10px;
   background-color: #ffffff;
}
the short stories look just like I like them to look. But then also the full story is shown only in 45% wide box. So I think there is a need to define e.g. :

Code: Select all

.show_news_box2{
  margin: 10px 0px 0px 0px;
  float:left;
}
to show the full story in 100% width in index.php. This file seems to be encrypted, however.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

mvwd
Posts: 299
Joined: Tue Jun 17, 2008 10:35 pm
Location: Baden Württemberg / Germany
Contact:

Re: Advancednews in 2 columns

Post by mvwd » Thu Jul 23, 2009 1:24 pm

...aah, i understand (thanx Tata ;) ).
You can use this script to dynamically set the width/float of the css for the news:

Code: Select all

#CMSimple $output=shownewsbox('showlatest=5,alwayspublish=true'); $hjs.=(!preg_match('"&id=[0-9]"si',$_SERVER['QUERY_STRING']))?'<style type="text/css">div.show_news_box{width:45%; float:left;}</style>':'';#
Use this instead of your original shownewsbox()-script.
Hope this helps.

mvwd.

oldnema
Posts: 265
Joined: Wed Jan 21, 2009 5:15 pm
Location: Czech Republic
Contact:

Re: Advancednews in 2 columns

Post by oldnema » Thu Jul 23, 2009 2:22 pm

You are a genius! Thank you so much and much! It works :-)
Nobody knows how much time he has left ...
http://oldnema.compsys.cz/en/?Demo_templates

Post Reply