2 columns news + features
Chris500 0
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: 2 columns news + features
Chris500
OP
0
From: -
From: -
2 columns news + features
That's awesome, thanks so much for your help Philipp
That's awesome, thanks so much for your help Philipp
1 Re: 2 columns news + features
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
2 columns news + features
This problem was caused by the additional }. You need to the additional } after the second code section.
This problem was caused by the additional }. You need to the additional } after the second code section.
$mainnews .= GetTemplate("news_col_header");
$mainnews .= GetTemplate("news_col_news");
$mainnews .= GetTemplate("news_col_middle");
if ($review_id_array[$review_list])
{
$insert['story_title'] = $review_title_array[$review_list];
$snip = explode("n", $review_text_array[$review_list]);
$insert['story_text'] = $snip[0];
$insert['story_text'] .= "<br /><br /><a href="https://www.contentteller.com/review.php?id=".$review_id_array[$review_list]."">Read more</a>";
$mainnews .= GetTemplate("news_col_news");
}
$review_list++;
$mainnews .= GetTemplate("news_col_footer");
}
}
1 Re: 2 columns news + features
Chris500
OP
0
From: -
From: -
2 columns news + features
Thanks Philipp - email sent
Thanks Philipp - email sent
1 Re: 2 columns news + features
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
2 columns news + features
Can you send me your index.php to office [-at-] esselbach [-dot-] com? I need to take a look after this modification is working fine here.
Can you send me your index.php to office [-at-] esselbach [-dot-] com? I need to take a look after this modification is working fine here.
1 Re: 2 columns news + features
Chris500
OP
0
From: -
From: -
2 columns news + features
Originally posted by Philipp:
The first code modification i added below what you said to find.
The second code modification i replaced the code. I also added an additional } on the end as without it , it caused an error
Originally posted by Philipp:
Did you have replaced and not added the second code section?
The first code modification i added below what you said to find.
The second code modification i replaced the code. I also added an additional } on the end as without it , it caused an error
1 Re: 2 columns news + features
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
2 columns news + features
Did you have replaced and not added the second code section?
Did you have replaced and not added the second code section?
1 Re: 2 columns news + features
Chris500
OP
0
From: -
From: -
2 columns news + features
Thanks for the reply
So far so good but it seems after the first News and Review pieces are added the tables seem to nest in the 2nd column.
Here's a screenshot:
http://img146.imagevenue.com/img.php?image=43973_storyteller_main_122_515lo.jpg
As you can see the news updates are working fine it's just the formatting that's a little off. The reviews column just seems to keep duplicating rather than publish the new review article.
Thanks
Thanks for the reply
So far so good but it seems after the first News and Review pieces are added the tables seem to nest in the 2nd column.
Here's a screenshot:
http://img146.imagevenue.com/img.php?image=43973_storyteller_main_122_515lo.jpg
As you can see the news updates are working fine it's just the formatting that's a little off. The reviews column just seems to keep duplicating rather than publish the new review article.
Thanks
1 Re: 2 columns news + features
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
2 columns news + features
Here the modification. Open index.php in an editor and find:
and add:
Find (below):
and replace with:
You also need to change the following setting in cadmin: Other /Websites => Sort main news by day => No
Would it be possible to have the latest reviews in this column instead? Cos basically i'll be adding large editorials to the site (multi page articles) and i think that would be better suited for the review system.... but could i get the output of the latest reviews on the mainpage and would it match the news layout with a brief explanation of the article?
Here the modification. Open index.php in an editor and find:
}
$mainnews .= GetTemplate("news_subfooter");
}
}
else
{
and add:
$result = DBQuery("SELECT review_id, review_title, review_text FROM esselbach_st_review WHERE review_page = '1' AND review_hook = '0' ORDER BY review_id DESC");
while(list($review_id,$review_title,$review_text) = mysql_fetch_row($result))
{
$review_id_array[] = $review_id;
$review_title_array[] = $review_title;
$review_text_array[] = $review_text;
}
$review_list = 0;
Find (below):
if ($blocks[website_newscols])
{
if (!$newsrow)
{
$mainnews .= GetTemplate("news_col_header");
$newsrow = 1;
}
elseif ($newsrow == 1)
{
$mainnews .= GetTemplate("news_col_middle");
$newsrow = 2;
}
$mainnews .= GetTemplate("news_col_news");
if ($newsrow == 2)
{
$mainnews .= GetTemplate("news_col_footer");
$newsrow = 0;
}
}
else
{
$mainnews .= GetTemplate("news");
}
}
if ($newsrow == 1)
{
$mainnews .= GetTemplate("news_col_middle");
$mainnews .= GetTemplate("news_col_footer");
}
and replace with:
$mainnews .= GetTemplate("news_col_header");
$mainnews .= GetTemplate("news_col_news");
$mainnews .= GetTemplate("news_col_middle");
if ($review_id_array[$review_list])
{
$insert['story_title'] = $review_title_array[$review_list];
$snip = explode("n", $review_text_array[$review_list]);
$insert['story_text'] = $snip[0];
$insert['story_text'] .= "<br /><br /><a href="https://www.contentteller.com/review.php?id=".$review_id_array[$review_list]."">Read more</a>";
$mainnews .= GetTemplate("news_col_news");
}
$review_list++;
$mainnews .= GetTemplate("news_col_footer");
You also need to change the following setting in cadmin: Other /Websites => Sort main news by day => No
1 Re: 2 columns news + features
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
2 columns news + features
This will require a few heavy modifications in index.php. I will look into it later.
Luckily, I have backups of all important files.
Im not sure what the best way to do this is, so if you could give me some advice that would be great.
This will require a few heavy modifications in index.php. I will look into it later.
You didn't loose anything critical did you Philipp?
Luckily, I have backups of all important files.
1 Re: 2 columns news + features
iampedro 13
From: -
From: -
2 columns news + features
You didn't loose anything critical did you Philipp?
You didn't loose anything critical did you Philipp?
1 Re: 2 columns news + features
Chris500
OP
0
From: -
From: -
2 columns news + features
It's no problem
Im not sure what the best way to do this is, so if you could give me some advice that would be great.
Like i said before i'd like the normal news updates to be in a left-hand column, and the articles/feature updates in the right.
Would it be possible to have the latest reviews in this column instead? Cos basically i'll be adding large editorials to the site (multi page articles) and i think that would be better suited for the review system.... but could i get the output of the latest reviews on the mainpage and would it match the news layout with a brief explanation of the article?
I have examples of what i mean if you'd like.
It's no problem
Im not sure what the best way to do this is, so if you could give me some advice that would be great.
Like i said before i'd like the normal news updates to be in a left-hand column, and the articles/feature updates in the right.
Would it be possible to have the latest reviews in this column instead? Cos basically i'll be adding large editorials to the site (multi page articles) and i think that would be better suited for the review system.... but could i get the output of the latest reviews on the mainpage and would it match the news layout with a brief explanation of the article?
I have examples of what i mean if you'd like.
1 Re: 2 columns news + features
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
2 columns news + features
Sorry for the delay. I had yesterday an accident with the PowerPC version of Fedora Core 6, which whiped out my entire Mac OS partition . I am still reinstalling my machine.
I will look into both problems as soon everything is working again.
Sorry for the delay. I had yesterday an accident with the PowerPC version of Fedora Core 6, which whiped out my entire Mac OS partition . I am still reinstalling my machine.
I will look into both problems as soon everything is working again.
1 Re: 2 columns news + features
Chris500
OP
0
From: -
From: -
2 columns news + features
Ok Philip i have implemented the code for the 2 column layout, only the display isnt quite what i need.
Let me explain, i would like all normal news articles to be displayed in column and all the feature news articles to be displayed in a seperate column.
Example,
News = 1
Feature newss = 2
1 2
1 2
1 2
1 2
1 2
With the current code modifications, this is whats happening.
2 2
2 2
1
1
1
1
Thanks.
Ok Philip i have implemented the code for the 2 column layout, only the display isnt quite what i need.
Let me explain, i would like all normal news articles to be displayed in column and all the feature news articles to be displayed in a seperate column.
Example,
News = 1
Feature newss = 2
1 2
1 2
1 2
1 2
1 2
With the current code modifications, this is whats happening.
2 2
2 2
1
1
1
1
Thanks.
1 Re: 2 columns news + features
Chris500
OP
0
From: -
From: -
2 columns news + features
Thanks Philip, i decided to install the script in the root and everything is working fine
Im currently trying to get the mod_rewrite urls exactly as i want them.
so far i have the following output /10-news-test-1.html
10 being the article id.
My ideal setup would be to have a /news/ subdomain added for all the news postings, and the custom categories as a prefix to the reviews, is this possible?
Thanks.
Thanks Philip, i decided to install the script in the root and everything is working fine
Im currently trying to get the mod_rewrite urls exactly as i want them.
so far i have the following output /10-news-test-1.html
10 being the article id.
My ideal setup would be to have a /news/ subdomain added for all the news postings, and the custom categories as a prefix to the reviews, is this possible?
Thanks.
1 Re: 2 columns news + features
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
2 columns news + features
This requires a larger modification in index.php. Find:
and replace with:
Yes, you need to add always the full path from your root directory to .htaccess. Here an example:
For my main page i'd like to display 2 columns, the left hand one showing latest news and the right hand column for featured articles with teaser images.
This requires a larger modification in index.php. Find:
$mainnews .= GetTemplate("news");
}
$mainnews .= GetTemplate("news_featuredfooter");
and replace with:
if (!$newsrow)
{
$mainnews .= GetTemplate("news_col_header");
$newsrow = 1;
}
elseif ($newsrow == 1)
{
$mainnews .= GetTemplate("news_col_middle");
$newsrow = 2;
}
$mainnews .= GetTemplate("news_col_news");
if ($newsrow == 2)
{
$mainnews .= GetTemplate("news_col_footer");
$newsrow = 0;
}
}
if ($newsrow == 1)
{
$mainnews .= GetTemplate("news_col_middle");
$mainnews .= GetTemplate("news_col_footer");
}
$mainnews .= GetTemplate("news_featuredfooter");
Im currently running the script in a test directory, could that be causing the problems?
Yes, you need to add always the full path from your root directory to .htaccess. Here an example:
RewriteRule ^index.html$ /test/index.php
RewriteRule ^story.html$ /test/story.php?id=1
RewriteRule ^story([0-9]+).html$ /test/story.php?id=$1
RewriteRule ^story([0-9]+)-1.html$ /test/story.php?id=$1
RewriteRule ^print([0-9]+).html$ /test/printer.php?id=$1
...
1 Re: 2 columns news + features
Chris500
OP
0
From: -
From: -
2 columns news + features
Also, im getting 404 errors when using the mod_rewrite templates and htaccess.
Im currently running the script in a test directory, could that be causing the problems?
Also, im getting 404 errors when using the mod_rewrite templates and htaccess.
Im currently running the script in a test directory, could that be causing the problems?
For my main page i'd like to display 2 columns, the left hand one showing latest news and the right hand column for featured articles with teaser images.
How would i go about doing this? If someone could show me just with the basic template code i would be really greatful