-
News & Article Management [Support]
Archived News & Article Management support thread can be found at:
http://www.zen-cart.com/forum/showthread.php?t=11372
Original post on Jan 23 2005. 311 posts in the archived thread.
Last post in archived thread is May 04 2006:
http://www.zen-cart.com/forum/showth...stpost&t=11372
Link to module download and documentation is at:
http://www.dream-scape.com/pub/zenca...es_Management/
-
Continued N&AM issues on v.1.27
Awhile back I installed version 2.110 of this mod on Zen Cart 1.27. However the N&AM "Summary" appears on the shoppe home page twice (directly on top of each other) and I still do not know how to repair.
In Admin when I set Display News Summary to false both Summaries go away. But setting to true again redisplays the duplicated summaries.
Is this a bug? Other folks have asked this question before without any response. Any ideas what would cause such behavior?
Another question: Can comments be moderated? In admin can set "Comments require customer login" for user to post comments.
But is there a moderator queue (ala mailing list) for comment posts? Or at least a method to edit posts? (I understand I can edit the dB but hoping an admin GUI is available for moderation... If not suggestion for a future upgrade). Thanks.
Woody
-
Re: News & Article Management
Looks like no solution to the duplicate summary issue I pointed out in previous posts. Bummer.
Beyond that I just discovered someone is spamming comments to a posted news article. Even though I configured the mod to allow comments from logged in users only, this person is not logging in when making comments (at least I see no account name with the name the spammer is using to post).
And unless I missing a configuration setting I cannot see any method to turn off posting Comments.
Below are my settings under Configuration > News & Article Management:
Display News Summary false
News Summary Cutoff Days 365
News Summary Length 300 Info
Comments Require Customer Login true
Comments Name Min Length 3
Comments Text Min Length 25
Email Admin Comments Notice true
News RSS Feed Days 365
So time to uninstall this mod. Too bad. :down:
And I will revert back to News Manager which runs well with Info Pages on Zen Cart 1.27 and is not open to comment spamming as apaprently News & Artilce Management is.
And I will port News Manager so it works on 1.3x if it does not already and ensure it cooperates with ez-pages.
Woody
-
Re: News & Article Management
can you post a working news management system? I'm really needing one.
thanks,
Shackle :)
Quote:
Originally Posted by Woodymon
Looks like no solution to the duplicate summary issue I pointed out in previous posts. Bummer.
Beyond that I just discovered someone is spamming comments to a posted news article. Even though I configured the mod to allow comments from logged in users only, this person is not logging in when making comments (at least I see no account name with the name the spammer is using to post).
And unless I missing a configuration setting I cannot see any method to turn off posting Comments.
Below are my settings under Configuration > News & Article Management:
Display News Summary false
News Summary Cutoff Days 365
News Summary Length 300 Info
Comments Require Customer Login true
Comments Name Min Length 3
Comments Text Min Length 25
Email Admin Comments Notice true
News RSS Feed Days 365
So time to uninstall this mod. Too bad. :down:
And I will revert back to News Manager which runs well with Info Pages on Zen Cart 1.27 and is not open to comment spamming as apaprently News & Artilce Management is.
And I will port News Manager so it works on 1.3x if it does not already and ensure it cooperates with ez-pages.
Woody
-
Re: News & Article Management
-
Re: News & Article Management
Quote:
Originally Posted by Woodymon
Looks like no solution to the duplicate summary issue I pointed out in previous posts. Bummer.
There is nothing wrong with the module that I can see off hand that would cause this. Numerous sites are running it just fine in ZC 1.3 without this issue, including the Zen Cart site.
The only thing that I can think that would make that happen is if you are including the news_summary.php multiple times. Are you sure that you have not accidentally placed its call inside of a loop?
-
Re: News & Article Management
Quote:
Originally Posted by Woodymon
Beyond that I just discovered someone is spamming comments to a posted news article. Even though I configured the mod to allow comments from logged in users only, this person is not logging in when making comments (at least I see no account name with the name the spammer is using to post).
Whoops. Boy is my face red :oops:
It is fairly easy to fix good enough until such time as I get enough time to make an updated version with better comment spam protection. Though this + requiring login should work fairly well.
1. Open includes/modules/pages/news_comments/header_php.php
2. Find the lines, approximately around line 50:
PHP Code:
// Oh posting the comments!
if (isset($_POST['action']) && ($_POST['action'] == 'process')) {
3. Directly after those lines, add the following:
PHP Code:
/**
* Prevent users from directly hitting the form when NEWS_COMMENTS_REQUIRE_CUSTOMER is true
*/
if ((NEWS_COMMENTS_REQUIRE_CUSTOMER == 'true') && !isset($_SESSION['customer_id'])) {
exit;
}
4. The final result should appear something like:
PHP Code:
// Oh posting the comments!
if (isset($_POST['action']) && ($_POST['action'] == 'process')) {
/**
* Prevent users from directly hitting the form when NEWS_COMMENTS_REQUIRE_CUSTOMER is true
*/
if ((NEWS_COMMENTS_REQUIRE_CUSTOMER == 'true') && !isset($_SESSION['customer_id'])) {
exit;
}
And that should stop anonymous spam when NEWS_COMMENTS_REQUIRE_CUSTOMER is true. :)
-
Re: News & Article Management
could you be a little more exact on how this fix this please? I didn't edit anything i uploaded as is.
Quote:
Originally Posted by dreamscape
There is nothing wrong with the module that I can see off hand that would cause this. Numerous sites are running it just fine in ZC 1.3 without this issue, including the Zen Cart site.
The only thing that I can think that would make that happen is if you are including the news_summary.php multiple times. Are you sure that you have not accidentally placed its call inside of a loop?
-
Re: News & Article Management
Quote:
Originally Posted by shackle
could you be a little more exact on how this fix this please? I didn't edit anything i uploaded as is.
You would have had to have editing something to install the optional news summary module, unless you uploaded the included tpl_index_default.php, but that is only for an unmodified Zen Cart 1.2.5 or something from long ago. To get the summary into newer Zen Cart's, you'd want to manually do it as the directions say to, so all I can say is look to where you placed it in your index template, and remove it from a loop it may be in.
-
Re: News & Article Management
I did everything listed at your site. I added the code the those files at the bottom i didn't upload the TPL or meta tags i learned that does not work with the newer zen-cart.... still kinda puzzled i don't rememeber changing anything.
Quote:
Originally Posted by dreamscape
You would have had to have editing something to install the optional news summary module, unless you uploaded the included tpl_index_default.php, but that is only for an unmodified Zen Cart 1.2.5 or something from long ago. To get the summary into newer Zen Cart's, you'd want to manually do it as the directions say to, so all I can say is look to where you placed it in your index template, and remove it from a loop it may be in.
-
Re: News & Article Management
Quote:
Originally Posted by shackle
I added the code the those files at the bottom
That is what I am saying; you have accidentally added it inside of a loop in the file. just move it out of the loop.
-
Re: News & Article Management
Quote:
Originally Posted by dreamscape
That is what I am saying; you have accidentally added it inside of a loop in the file. just move it out of the loop.
forgive me for being a noob, but whats a loop and where can it be found?
-
Re: News & Article Management
Quote:
Originally Posted by shackle
forgive me for being a noob, but whats a loop and where can it be found?
A loop is something that repeats a process until it reaches some point at which it is told to stop. Common PHP loop constructs are for(), foreach(), and while().
Where it can be found is whereever you placed the call to the new summary module. I have really no idea where that is or what exactly it looks like. I can't magically see your code in my head ;)
Your statement, "I added the code the those files at the bottom [..snip..] still kinda puzzled i don't rememeber changing anything," makes little sense. There is no way you could have added the news summary code to your site without changing your index template. So let's just assume that you did change a file, your index template, since the news summary is showing up [otherwise it would be impossible for it to show up]. The installation directions do not say exactly where you should put the news summary code in the file, because you can put it where-ever you want on the page; however, you have apparently placed it inside of a loop, which is why you see it repeating. You must remove it from the loop and reposition it in the code some place that is not being looped over. You'll need at least basic PHP knowledge to do this in order to know if you are inside or outside of a loop.
-
Re: News & Article Management
I mean i didn't change anything other then what the website said.
here are the 2 files changed:
Includes/modules/meta_tags.php
includes/templates/template_default/templates/tpl_index_default.php
download here: http://www.guildvalor.com/files.zip
Quote:
Originally Posted by dreamscape
A loop is something that repeats a process until it reaches some point at which it is told to stop. Common PHP loop constructs are for(), foreach(), and while().
Where it can be found is whereever you placed the call to the new summary module. I have really no idea where that is or what exactly it looks like. I can't magically see your code in my head ;)
Your statement, "I added the code the those files at the bottom [..snip..] still kinda puzzled i don't rememeber changing anything," makes little sense. There is no way you could have added the news summary code to your site without changing your index template. So let's just assume that you did change a file, your index template, since the news summary is showing up [otherwise it would be impossible for it to show up]. The installation directions do not say exactly where you should put the news summary code in the file, because you can put it where-ever you want on the page; however, you have apparently placed it inside of a loop, which is why you see it repeating. You must remove it from the loop and reposition it in the code some place that is not being looped over. You'll need at least basic PHP knowledge to do this in order to know if you are inside or outside of a loop.
-
Re: News & Article Management
Just as I've been saying, the problem is that you have placed the new summary inside of a loop.
The loop starts at line 44 with:
PHP Code:
while (!$show_display_category->EOF) {
and it ends at lines 85-88 with:
PHP Code:
<?php
$show_display_category->MoveNext();
} // !EOF
?>
You need to move the call to the news summary module outside of the loop.
-
Re: News & Article Management
-
Re: News & Article Management
Hi I'd just want to list news in one page. lets say five latest entrys and then link to previous five entrys. No archives etc. is it possible with this? thanks a lot
-
Re: News & Article Management
or if it cant be done. Can I somehow display just recent news and change the article heading instead of date.
News for Friday 19. Mayta
* test
View all news for Friday 19. Mayta on one page
Recent News
* Monday 08. May
* Monday 01. May
News archive
So that would change in to:
Recent News
* Test (Friday 19. May)
* Test 23 (Monday 08. May)
* test 3030 (Monday 01. May)
*the dates doesnt need to be displayed
-
Re: News & Article Management
Yea i was having the same issue mines set to show 7 days of news but when ever i make a new post my old ones are gone. :(
Quote:
Originally Posted by poosk
Hi I'd just want to list news in one page. lets say five latest entrys and then link to previous five entrys. No archives etc. is it possible with this? thanks a lot
-
Re: News & Article Management
Quote:
Originally Posted by shackle
Yea i was having the same issue mines set to show 7 days of news but when ever i make a new post my old ones are gone. :(
No the setting is not to show 7 days of news. It is to show the news summary if there has been news in the past XX [7 by default] days. So if you don't post anything for a week, then the summary will stop showing up. And it only shows for the last news day, only a summary of the top most entry.
If you want something different, you will have to code it. Yes anything is possible, but you have to program it yourself. This is part of what open source is all about. The tools are all there, and the news module code should show you enough to get done what you want done.
If I've gone over your head now, then you will probably not be able to do it yourself, and thus your best course is to hire a programmer to do the programming for you... gee who would have thought there are these professionals called programmers who do programming :wink2:
-
Re: News & Article Management
Quote:
Originally Posted by dreamscape
The only thing that I can think that would make that happen is if you are including the news_summary.php multiple times. Are you sure that you have not accidentally placed its call inside of a loop?
I. My face is red. It was inside the loop. Thanks for the hint.
II. Also thanks for the updated code to help prevent comment spamming. I have yet to implement but will soon.
III. Also I found the optional news archive sidebox did not include a class for "sideBoxContent". So I added by editing tpl_news_archive.php as follows:
Code:
$content = '<div class="sideBoxContent">';
$content .= '<div class="newsArchiveSideBox">';
$newsDisplay = new newsDisplay();
foreach ($newsArchiveList as $archive) {
$newsDisplay->articleFooter(sprintf(BOX_NEWS_ARCHIVE_TEXT_ARCHIVE_LIST_HEADER, $archive['archiveDate']), $archive['archiveLinks'], false, false, false);
}
$content .= $newsDisplay->displayNewsPage(false);
$content .= '</div>';
$content .= '</div>';
IV. Also I would like to rid of the first clearSplit in the news archive sidebox to rid of extra whitespace between the year (e.g. 2006) and the top sidebox image. Anyone have a quick fix?
I see the source of clearSplit is the newsDisplay() function within news.php class file. That function also renders all the other news pages so unsure how to adapt for sidebox without negatively impacting display of the news pages. I figure I might need to write another function specific to the sidebox in the class file (to drop the clearSplits) and call it from tpl_news_archive.php. But I don't yet have enough PHP knowledge yet to decipher tpl_news_archive.php
Woody
-
Re: News & Article Management
Quote:
Originally Posted by dreamscape
No the setting is not to show 7 days of news. It is to show the news summary if there has been news in the past XX [7 by default] days. So if you don't post anything for a week, then the summary will stop showing up. And it only shows for the last news day, only a summary of the top most entry.
If you want something different, you will have to code it.
If anyone is thinking of doing this please PM me.
I'm not sure if I have the coding chops but I'm thinking of taking a swipe at enabling so admin can set the number of days to display articles in summary, and set the number of articles that can be displayed.
Similar to what the "News Manager" mod supports.
Also a sidebox displaying a dynamic list of the latest article titles (but not a scroller sidebox, but that optional sidebox could be used as a basis).
Again similar to what the "News Manager" mod supports.
Woody
-
Re: News & Article Management
why doesn't my browser display an rss icon in my news page. and I cannot subscribe to the rss
-
Re: News & Article Management
how do i get rid of the duplate bredcrumb for the news contrib
ir what file do i have to edit?
-
Re: News & Article Management
remove the breadcrumb from the news templates
-
Re: News & Article Management
Quote:
Originally Posted by Kim
remove the breadcrumb from the news templates
done thanks
-
Re: News & Article Management
Hi despite the long efforts of understanding loops and php I really couldnt do it. I'd just like to list all the news on one page and have a rss feed for it. no complicated archives or irritating links to every single post. If anyone can help it would be really appreciated. or if anyone has some other contribution in mind let me know
-
Re: News & Article Management
Hello all,
This is a brill mod. I have been using this from 1.27 upwards. I upgraded to 1.301, and noticed a difference on the new.php page. Example is below:-
http://www.thegemtree.com/index.php?main_page=news
On the first article, I had entered a summary image which doesn't seem to show. The second article is purposely concise for now. Also, several lines appear below each article which are not part of the admin-side entry. I noticed that nobody else mentioned anything like this, so I don't know if this is just exclusive to my site.
If not, I wonder if it is just a case of amending new.php file?
Many thanks,
Russ :thumbsup:
-
Re: News & Article Management
I'm using this with 1.3. I would like to wrap a div around the entire news template (it needs a little padding). However, I've looked at the tpl files and they are a different format than the rest of zen and I can;t seem to figure out how to do it.
-
Re: News & Article Management
Quote:
Originally Posted by voltage
I'm using this with 1.3. I would like to wrap a div around the entire news template (it needs a little padding). However, I've looked at the tpl files and they are a different format than the rest of zen and I can;t seem to figure out how to do it.
hi, I think I have had the same padding issue in 1.3 , but used
Code:
td { padding: 0.5em; }
as a workaround
cheers
-
Re: News & Article Management
Hi,
Which file are you supposed to edit to change the look of the news summary?
-
Re: News & Article Management
hi there, you can edit the stylesheet_news.css to change the look
-
Re: News & Article Management
Does this mod work with Zen Cart 1.3.0.2?
I got it working for 1.3 but I want to make sure it works for the latest version before I try to install it.
-
Re: News & Article Management
Quote:
Originally Posted by polarduality
Does this mod work with Zen Cart 1.3.0.2?
I got it working for 1.3 but I want to make sure it works for the latest version before I try to install it.
work fine in 1.3.0.2
i was able to wrap it in my current template.
-
News & Article Management
i got the following error after installing the SQL patch for Sidebox Scroller v1.0 thru admin;
ERROR: Cannot execute because table configuration, does not exist. CHECK PREFIXES!
Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
what was that?!
-
Re: News & Article Management
Quote:
Originally Posted by Zapisto
work fine in 1.3.0.2
i was able to wrap it in my current template.
Do you mind sharing how you accomplished wrapping it?
Thanks!
-
Re: News & Article Management
I just installed the mod on 1.3.0.2 and it seems to be working fine.
Just need to get rid of a bunch of lines that are showing up.
I didn't try any of the optional plugins for this mod.
Don't think you need to "wrap" it in anything.
Just follow the install directions.
-
Re: News & Article Management
Quote:
Originally Posted by tajul_ashyqin
i got the following error after installing the SQL patch for Sidebox Scroller v1.0 thru admin;
ERROR: Cannot execute because table configuration, does not exist. CHECK PREFIXES!
Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
what was that?!
I think this could be something to do with your table prefixes. Try installing the patch using phpMyAdmin directly.
-
Re: News & Article Management
Quote:
Originally Posted by BlessIsaacola
Do you mind sharing how you accomplished wrapping it?
Thanks!
Yes, there isn't really anything you need to wrap. To change the look, just edit the stylesheet_news.css. I installed it on 1.3.0.2 with no trouble :)
-
News & Article Management
Quote:
Originally Posted by Danielle
I think this could be something to do with your table prefixes. Try installing the patch using phpMyAdmin directly.
thanx for the reply danielle!i'll try it a.s.ap! fyi, i installed it on v1.3x.
-
Re: News & Article Management
I have worked with the java code for the width, height, and velocity of the scrollbox but doesn't seem to do anything. :no:
How can I manipulate these elements? Isn't it supposed to be on newsScroller.js?
-
Re: News & Article Management
Quote:
Originally Posted by ideasgirl
How can I manipulate these elements?
There are settings in the admin after you install it for the height, amount, & delay (amount & delay control speed). The width is automatically set to roughly the column width that it is placed in.
-
Re: News & Article Management
Ok, but where? It's not on "News & Articles Management". :huh:
-
Re: News & Article Management
Quote:
Originally Posted by ideasgirl
Ok, but where? It's not on "News & Articles Management". :huh:
It is in the news & articles settings if you installed the scrollbox sql.
-
Re: News & Article Management
Well, apparently something is wrong, this is my patch:
PHP Code:
# News Scroller Config
INSERT INTO configuration VALUES ('', 'News Sidebox Scroller Days', 'NEWS_SCROLLER_NUMBER_OF_DAYS', '7', 'The news sidebox scroller will only contain news from the past xx news days', '2504', '100', NULL, now(), NULL, NULL),
('', 'News Sidebox Scroller Height', 'NEWS_SCROLLER_HEIGHT', '250', 'The height of the news sidebox scroller box', '2504', '101', NULL, now(), NULL, NULL),
('', 'News Sidebox Scroller Amount', 'NEWS_SCROLLER_AMOUNT', '2', 'The amount to scroll by', '2504', '102', NULL, now(), NULL, NULL),
('', 'News Sidebox Scroller Delay', 'NEWS_SCROLLER_DELAY', '100', 'The amount of delay when scrolling', '2504', '103', NULL, now(), NULL, NULL);
UPDATE configuration, configuration_group SET configuration.configuration_group_id = configuration_group.configuration_group_id WHERE configuration_group.configuration_group_title = 'News & Articles Management' AND configuration.configuration_group_id = '2504';
but it stops while processing.
-
Re: News & Article Management
That Update statement should be commented out. It doesn't work with the Zen Cart SQL Patch tool.
The Select & Update statement after it should be the one that runs and it should read:
Code:
SELECT @group_id := configuration_group_id FROM configuration_group WHERE configuration_group_title = 'News & Articles Management';
UPDATE configuration SET configuration_group_id = @group_id where configuration_group_id = '2504';
If you've already run the INSERT INTO configuration VALUES ... statement, don't run it again. Just run what I've posted above.
-
Re: News & Article Management
B I N G O ! :smartass: Thanks!
-
News & Article Management
:cry:
its not working for me though... the scroller setting still wont appear where it should be!
-
Re: News & Article Management
Is this News and Articles module support multilanguage?
If not, is there any code suggest to add for this function?
Thanks.
-
News & Article Management
Quote:
Originally Posted by icemanchai
Is this News and Articles module support multilanguage?
If not, is there any code suggest to add for this function?
Thanks.
yup, it is support multilanguage function... no special code required!
-
Re: News & Article Management
Is it supposed to go to the last article post when clicking on "Articles....more"? or is it supposed to go to to the archive? or....?
How can I make the archive page to display the intro/summary for each article?
-
Re: News & Article Management
Thanks Tajul_ashyqin. I want to clarify that:
Does it mean I can input three different news interpretation for switching among three languages environment?
Or you mean I can type in different language but only showed one kind of language whenever I switch the language environments?
Thanks.
-
News & Article Management
Quote:
Originally Posted by icemanchai
Thanks Tajul_ashyqin. I want to clarify that:
Does it mean I can input three different news interpretation for switching among three languages environment?
Or you mean I can type in different language but only showed one kind of language whenever I switch the language environments?
Thanks.
hi,
yup, you have to input the three different news interpretation thru the ZC Admin! at the front end, the respective news will only be display according to the language selection... good luck!
-
Re: News & Article Management
Thanks Tajul_ashyqin. It's good. Hope more module will support multilanguages. :laugh:
-
Re: News & Article Management
Okay, cool! I got it to work with ZC 1.3.1.
I had some troubles with my install today, but they were entirely my own.
I had some similar errors that at first looked like they were table name errors in the database, but it just turns out that I just didn't have every file uploaded. (Stupid "synchronize").
Anyway, I noticed that the CSS for the body text on the article detail wasn't working... but really it is. In the text editor, just make sure that you lable your entries with "normal" or they will sit out there with no formatting whatsoever. I thought that the body text wasn't held by CSS at all (that's what the html said) but I was just missing the <p> tags.
So, thank you very much for this module. It's exactly what I was needing. Please ignore my pitiful email good sir.
-
Re: News & Article Management
I just upgraded my cart to 1.3.5 and notice something wrong with News and article mod, the image for the summary is not blending in the text as with previous 1.3.0.2, but just sit on top of text, you can have a look here :
http://www.mishobonsai.com/seeds (1.3.0.2)
http://www.mishobonsai.com/seeds135
Any idea ?
-
Re: News & Article Management
Hi,
I've installed the 'news sroller sidebox' add-on for this mod (which appears to be freaking awesome!) as I wanted my latest news to appear in a sidebox.
I was hoping I could disable the scrolling effect in the admin, however setting the delays to 0 doesn't have the desired effect.
Anyone know how I could remove the js without screwing up the rest of the script?
Would the 'news box manager' contribution have been a better choice for what I'm looking for and does it include the archive feature like this one?
Cheers
-
Re: News & Article Management
Is there a way to make FCK Editor the default editor for the News & Articles input area?
-
Re: News & Article Management
Hey!
Is it possible to set how many news will be shown on first page? Now, it only shows one and i have not found anything in the admin section.
Thank You
-
Re: News & Article Management
Sorry to jump in with a question that may be close to a duplicate.
Does the latest news manager release work with v1.35?
thank you,
betty
-
Re: News & Article Management
Hi Bettysue,
I've been using this contribution on my version of 1.3.5 for about a month now and haven't run into any problems.
If you decide to install the 'sidebox' add-on and discover how to limit the articles that are being displayed, please let me know! I'm days away from launching my cart and this is one of the few things I haven't been able to figure out!
Best of luck!
-
Re: News & Article Management
Having a small problem here with how the full article is showing up on the page.
It actually fills the center column to the very edges of my sideboxes.
you can see the problem here...
http://www.oldwestgames.com/news/sup...roops-a-1.html
this problem was brought up on this other thread but there is still no solution
http://www.zen-cart.com/forum/showth...t=news+article
I have tried everything to make the article behave but nothing is working. it seems in fact that (using the "view formatted source" tool in firefox) that it does not have a div that directly controls just the text.
please help me out here.
thanks
-
Re: News & Article Management
Just upgraded to 1.3.6
The image of the news and summary is not displaying right. It is on the left of the box, while all the text is under it.
It use to be an image on the right, with text on the left and under.
Any idea
-
Re: News & Article Management
Quote:
Originally Posted by
voltage
I'm using this with 1.3. I would like to wrap a div around the entire news template (it needs a little padding). However, I've looked at the tpl files and they are a different format than the rest of zen and I can;t seem to figure out how to do it.
Hi everybody,
First off, what a great mod! Many thanks Joshua :D
I don't know if anybody has posted anything in response to the above question but I was wondering the same thing. How can you wrap a div around the entire news content? It seemed difficult at fist because I tried editing the stylsheet to get some padding on the left but it didn't always work. In addition, on the main page the news content goes within the centerColumn container, but on article pages, comment pages, etc, there is no container, so styles would not be consistent.
Well I may have a solution, try it if you dare!
1. Browse to you includes/classes directory and find 'news.php'.
2. Make a backup just in case.
3. Open up the file for editing (I know it looks a little hectic but it's actually not) and notice that everything is broken into sections. For example you have:
Code:
function newsHeader($header, $date, $links_array = false) {
$this->news_page .= '<div class="newsHeader"><h1>' . $header . '</h1></div>' . "\n";
$this->news_page .= '<div class="newsHeadlineText">' . $date;
if ($links_array && is_array($links_array)) {
foreach ($links_array as $link) {
$this->news_page .= ' | <a href="' . $link['link'] . '">' . $link['text'] . '</a>';
}
}
$this->news_page .= '</div>' . "\n";
$this->clearSplit();
return true;
}
This houses the div classes for the newsHeader and newsHeadlineText.
4. Every section you want to wrap you've got to wrap individually. So for the above you would change the code to:
Code:
function newsHeader($header, $date, $links_array = false) {
$this->news_page .= '<div class="newsWrapper">';
$this->news_page .= '<div class="newsHeader"><h1>' . $header . '</h1></div>' . "\n";
$this->news_page .= '<div class="newsHeadlineText">' . $date;
if ($links_array && is_array($links_array)) {
foreach ($links_array as $link) {
$this->news_page .= ' | <a href="' . $link['link'] . '">' . $link['text'] . '</a>';
}
}
$this->news_page .= '</div>' . "\n";
$this->news_page .= '</div>' . "\n";
$this->clearSplit();
return true;
}
Note the code in red. This is what you must add before and after each specific area you want wrapped listed in this class file. Add the bolded lines at the begining and end of each section you want wrapped or need padding on.
Another example for the articleHeading div:
Before
Code:
function articleHeading($heading) {
$this->news_page .= '<p class="articleHeading">' . $heading . '</p>' . "\n";
return true;
}
After
Code:
function articleHeading($heading) {
$this->news_page .= '<div class="newsWrapper">';
$this->news_page .= '<p class="articleHeading">' . $heading . '</p>' . "\n";
$this->news_page .= '</div>' . "\n";
return true;
}
5. One other very important step would be to add the appropriate CSS to your stylesheet for the 'newsWrapper' style.
6. That's pretty much it. The only other thing I can think of is you may want to account for this additional style padding on your home page by editing your includes/templates/template_default/templates/tpl_index_default.php file where you added the news module (this is what makes it display on your home page) and setting up another div with a negative left margin like so:
Code:
<?php
/**
* get the Define Main Page Text
*/
?>
<div id="indexDefaultMainContent" class="content"><?php require($define_page); ?></div>
<?php } ?>
<div style="margin-left: -10px;">
<?php include(DIR_WS_MODULES . zen_get_module_directory(FILENAME_NEWS_SUMMARY_MODULE)); ?>
</div>
<?php
$show_display_category = $db->Execute(SQL_SHOW_PRODUCT_INFO_MAIN);
while (!$show_display_category->EOF) {
?>
Have fun!
- Jonah :cool:
-
Re: News & Article Management
Quote:
Originally Posted by
bombknex
Hi everybody,
First off, what a great mod! Many thanks Joshua :D
I don't know if anybody has posted anything in response to the above question but I was wondering the same thing. How can you wrap a div around the entire news content? It seemed difficult at fist because I tried editing the stylsheet to get some padding on the left but it didn't always work. In addition, on the main page the news content goes within the centerColumn container, but on article pages, comment pages, etc, there is no container, so styles would not be consistent...
sweet, Jonah.
I'm going to try that tomorrow and I'll let you know how it worked out.
thanks for the directions.
mafiasam
-
Re: News & Article Management
I would like to know if it would be possible to display summaries for multiple news items on my index page or, even better, if it would be possible to display the main index.php?main_page=news as the default first page when the user visits the site. I *could* create an index.html file with a <HEAD> redirect to this page, but this seems like an inelegant solution.
Thanks in advance.
-
Re: News & Article Management
Can someone please help me having a problem fckeditor i'm getting this error:
Warning: Missing argument 1 for FCKeditor::__construct(), called in W:\www\edy\admin\news.php on line 368 and defined in W:\www\edy\admin\includes\fckeditor.php on line 25
Fatal error: Call to undefined method FCKeditor::CreateFCKeditor() in W:\www\edy\admin\news.php on line 370
Can some please give me some insight on how to resolve this issue.
Thank you
-
Re: News & Article Management
Quote:
Originally Posted by
kaleco
I would like to know if it would be possible to display summaries for multiple news items on my index page or, even better, if it would be possible to display the main index.php?main_page=news as the default first page when the user visits the site. I *could* create an index.html file with a <HEAD> redirect to this page, but this seems like an inelegant solution.
Thanks in advance.
Hey all,
I'm looking for this functionality as well, mainly the display of multiple news items in my summary. Josh, do you have any input as to how this could be done? I tried 'astralp' modded news_summary.php (www.hgsounds.com/demo/news_summary.zip) from the archives but there are some big issues with it.
Any help would be appreciated!
- Jonah
-
Re: News & Article Management
I'm probably missing something here. Mod is great and works fine. All I want to do is have a (more) button on the sidebox that takes you to the list of all articles?? Is this in the mod? Same as the featured and new products sideboxes
-
Date and Time Display Problem with News Article Management
Hi everybody,
I've currently fallen into a no-way-out problem with Date and Time Display in News Article Management. To make things clear, my problem is that my store is in Vietnam (Time Zone: GMT+7) while my host server is in USA (Time Zone GMT-7).
Therefore, it always take an additional 14 hours before my articles actually appear in my website instead of the right date as being set in the admin side of News and Article Management.
Can anyone show me the way out of this problem? Pls help me with this since I'm really stuck.
Thank you in advance.
Best regards,
-
Re: News & Article Management
Quote:
Mod is great and works fine. All I want to do is have a (more) button on the sidebox that takes you to the list of all articles?? Is this in the mod?
The heading is clickable and should take you to the last article posted, not to the list which would be great. What I did is put a link with EZPages on the header navigation. To make it the way we want, it has to be modified on the code.
-
Re: News & Article Management
Hey guys,
first of all I want to thank Dreamscape for this nice contribution!!!!!
I finally got it to kinda work. I still can't get the dynamic page titles to work though.
However, my biggest the line spacing is off, and i have lines in between the text that i don't think belong there http://www.xtreme-stunts.com/ . It is most obvious with IE. Firefox displays it a little nicer.
Moreover, on my news index page, I have twice the same header row and the line spacing and horizontal lines are wrong, too http://www.xtreme-stunts.com/news/ .
I'm using zen cart 1.36 with ultimate urls and ideasgirl template.
Thank you very much for your help!!!!!!!
Nail
-
Re: News & Article Management
Has someone sucessfully added this mod to 1.3.6? Does it needs tweaking or can I get it to work "as is" ?
Thanks!
-
Re: News & Article Management
I'm running it on version 1.36.
I think it works pretty well. however, there are a few minor problems with the looks and layout. They could be because of my template or Ultimate Urls though.
Very nice contribution.
Nail
-
Re: News & Article Management
Quote:
Originally Posted by
dscott1966
Can someone please help me having a problem fckeditor i'm getting this error:
Warning: Missing argument 1 for FCKeditor::__construct(), called in W:\www\edy\admin\news.php on line 368 and defined in W:\www\edy\admin\includes\fckeditor.php on line 25
Fatal error: Call to undefined method FCKeditor::CreateFCKeditor() in W:\www\edy\admin\news.php on line 370
Can some please give me some insight on how to resolve this issue.
Thank you
I have the very same problem :down:
Did anyone solved it?? :lamo:
-
Re: News & Article Management
http://www.handicraft-vn.com/shop/
I was install this module and look great :smartass: ...but have small problem:Text: Recent News is too big and not well-balandced .Can somebody help me fix that problem :yes: ...
Thanks you so much
-
Re: News & Article Management
Quote:
Originally Posted by
kimsonvu
http://www.handicraft-vn.com/shop/
I was install this module and look great :smartass: ...but have small problem:Text: Recent News is too big and not well-balandced .Can somebody help me fix that problem :yes: ...
Thanks you so much
Try changing it on the news stylesheet.
betty
-
Re: News & Article Management
Thanks,but i dont know exact the line need to edit...i'm not programer..can you show it for me?
.newsHeadlineText { text-align: center; width: 100%; height: 15px; font-size: .9em; background: #e5edf5; border-left: 1px solid #9a9a9a; border-right: 1px solid #9a9a9a; border-top: 1px solid #9a9a9a; border-bottom: 5px solid #9a9a9a; padding: 3px 0 0 0; margin: 0;}
.newsHeadlineText IMG { vertical-align: middle; }
.newsHeader { background: #FFFFFF; height: 30px; font-size: 24px; text-align: center; padding: 0; margin: 10px 0 0 0; }
-
Re: News & Article Management
Thanks to StuntsMovies.com, I have installed this module and it's great, I still have a few minor problems but I'm working on that right now!
Quote:
Originally Posted by
kimsonvu
.newsHeader { background: #FFFFFF; height: 30px; font-size: 24px; text-align: center; padding: 0; margin: 10px 0 0 0; }
I personnally have changed font-size to 10px to fit the rest of my site but you may want to use a different value!
-
Re: News & Article Management
Hi,
Is this contrib compatible with zen 1.3.7 ??
Thanks in advance
:lookaroun
-
Re: News & Article Management
Quote:
Originally Posted by
titangen
Hi,
Is this contrib compatible with zen 1.3.7 ??
Thanks in advance
:lookaroun
I'm wondering the same thing myself.
-
Re: News & Article Management
Yes it is, i'm running it under latest version no problems.
-
Re: News & Article Management
For some reason, I can't get anything at all to show up. I don't see where it could be added. I see everything in the admin area. I even created a story as a test, but nothing shows up.
Layout Boxes, maybe? I'm using a custom template, so maybe this has something to do with it.
Any ideas?
-
Re: News & Article Management
In firefox, "Recent Zen Cart News" heading is on top of the date/rss stamp. Anyone know a solution?
-
Re: News & Article Management
Ok, I'm running the latest version of ZC. I installed the mod and "Recent Zen Cart News" shows on the main page. The problem begins when I try to click to read the full article or the archive page. As soon as I do, I get a...
Not Found
The requested URL /Something-com/products/index.php was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
It gets better. Prior to installing the "news and Article Management" mod, I installed the "ultimate seo urls" mod. I thought I would try and remove my .htaccess and see what happens. it gave me the same "Not Found" page as mentioned above with the requested url as products/news/XYZ.html
Help? Thanks in avancio
-
Re: News & Article Management
I have a question about where the Recent Zen Cart News heading color is changed. I've tried looking in a few of the css but no luck.
I changed the heading to "Latest SFF Store News" on my website if you don't know what I am talking about: http://store.sffclub.com/
-
Re: News & Article Management
i am having the same trouble. when I put on this mod. the news goes into the main page area and jumps out of the sidebox area! ::ohmy:
-
Re: News & Article Management
anyone please???????????????????????
-
Re: News & Article Management
please, help me
can i using fckeditor in news & article Managements?
if i can, please guide help me
thanks
-
Re: News & Article Management
Quote:
Originally Posted by
BuysZ
please, help me
can i using fckeditor in news & article Managements?
if i can, please guide help me
thanks
I think we can not.I use macromedia to edit and copy into news :D:wacko:
-
Re: News & Article Management
but i see image in Catalog Area Screenshots, they used editor in new articles management success.
i want made same this
http://www.dream-scape.com/pub/zenca...s/Admin009.jpg
-
Re: News & Article Management
Hi! I just installed the news & article management. Good stuff, thank you! I have two questions.
The bit that says Recent Zen Cart News is rather huge, and it gets overlapped by the date bar. Can you tell me what I need to edit in the stylesheet to fix that?
Also, how do I change 'Recent Zen Cart News' to something more appropriate for my site?
Thanks!
-
1 Attachment(s)
problem with 1.3.7
I have no idea why?
my zc is 1.3.7
-
FCKeditor problem solved
Hi everyone,
I was having the same problem with FCKeditor as many of you so i took a look at the code. This is for zen 1.3.7, i don't know if it's retro compatible.
You need to change the file /admin/news.php
Find (around line 205):
Code:
// HTML Editors support
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
require(DIR_WS_INCLUDES . 'fckeditor.php');
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
require(DIR_WS_INCLUDES . 'htmlarea.php');
}
and replace with:
Code:
// HTML Editors support
if ($_SESSION['html_editor_preference_status']== "FCKEDITOR") {
require(DIR_WS_INCLUDES . 'fckeditor.php');
} elseif ($_SESSION['html_editor_preference_status']== "HTMLAREA") {
require(DIR_WS_INCLUDES . 'htmlarea.php');
}
Find (around line 366):
Code:
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor;
$oFCKeditor->Value = (($news_article_shorttext[$lang['id']]) ? stripslashes($news_article_shorttext[$lang['id']]) : news_get_news_article_shorttext($nInfo->article_id, $lang['id']));
$oFCKeditor->CreateFCKeditor('news_article_shorttext[' . $lang['id'] . ']', '100%', '130') ; //instanceName, width, height (px or %)
echo '</td>';
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
and replace with:
Code:
if ($_SESSION['html_editor_preference_status']=='FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor('news_article_shorttext[' . $lang['id'] . ']') ;
$oFCKeditor->Value = (($news_article_shorttext[$lang['id']]) ? stripslashes($news_article_shorttext[$lang['id']]) : news_get_news_article_shorttext($nInfo->article_id, $lang['id']));
$oFCKeditor->Width = '97%' ;
$oFCKeditor->Height = '150' ;
$output = $oFCKeditor->CreateHtml() ;
echo '<br />' . $output . '</td>';
} elseif ($_SESSION['html_editor_preference_status']=='HTMLAREA') {
Find (around line 386)
Code:
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor;
$oFCKeditor->Value = (($news_article_text[$lang['id']]) ? stripslashes($news_article_text[$lang['id']]) : news_get_news_article_text($nInfo->article_id, $lang['id']));
$oFCKeditor->CreateFCKeditor('news_article_text[' . $lang['id'] . ']', '100%', '250') ; //instanceName, width, height (px or %)
echo '</td>';
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
and replace with:
Code:
if ($_SESSION['html_editor_preference_status']=='FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor('news_article_text[' . $lang['id'] . ']') ;
$oFCKeditor->Value = (($news_article_text[$lang['id']]) ? stripslashes($news_article_text[$lang['id']]) : news_get_news_article_text($nInfo->article_id, $lang['id']));
$oFCKeditor->Width = '97%' ;
$oFCKeditor->Height = '400' ;
$output = $oFCKeditor->CreateHtml() ;
echo '<br />' . $outtut . '</td>';
} elseif ($_SESSION['html_editor_preference_status']=='HTMLAREA') {
That should do it!
Best regards to the zen community!
-
Re: FCKeditor problem solved
Quote:
Originally Posted by
rikreations
Hi everyone,
I was having the same problem with FCKeditor as many of you so i took a look at the code. This is for zen 1.3.7, i don't know if it's retro compatible.
You need to change the file /admin/news.php
Find (around line 205):
Code:
// HTML Editors support
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
require(DIR_WS_INCLUDES . 'fckeditor.php');
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
require(DIR_WS_INCLUDES . 'htmlarea.php');
}
and replace with:
Code:
// HTML Editors support
if ($_SESSION['html_editor_preference_status']== "FCKEDITOR") {
require(DIR_WS_INCLUDES . 'fckeditor.php');
} elseif ($_SESSION['html_editor_preference_status']== "HTMLAREA") {
require(DIR_WS_INCLUDES . 'htmlarea.php');
}
Find (around line 366):
Code:
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor;
$oFCKeditor->Value = (($news_article_shorttext[$lang['id']]) ? stripslashes($news_article_shorttext[$lang['id']]) : news_get_news_article_shorttext($nInfo->article_id, $lang['id']));
$oFCKeditor->CreateFCKeditor('news_article_shorttext[' . $lang['id'] . ']', '100%', '130') ; //instanceName, width, height (px or %)
echo '</td>';
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
and replace with:
Code:
if ($_SESSION['html_editor_preference_status']=='FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor('news_article_shorttext[' . $lang['id'] . ']') ;
$oFCKeditor->Value = (($news_article_shorttext[$lang['id']]) ? stripslashes($news_article_shorttext[$lang['id']]) : news_get_news_article_shorttext($nInfo->article_id, $lang['id']));
$oFCKeditor->Width = '97%' ;
$oFCKeditor->Height = '150' ;
$output = $oFCKeditor->CreateHtml() ;
echo '<br />' . $output . '</td>';
} elseif ($_SESSION['html_editor_preference_status']=='HTMLAREA') {
Find (around line 386)
Code:
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor;
$oFCKeditor->Value = (($news_article_text[$lang['id']]) ? stripslashes($news_article_text[$lang['id']]) : news_get_news_article_text($nInfo->article_id, $lang['id']));
$oFCKeditor->CreateFCKeditor('news_article_text[' . $lang['id'] . ']', '100%', '250') ; //instanceName, width, height (px or %)
echo '</td>';
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
and replace with:
Code:
if ($_SESSION['html_editor_preference_status']=='FCKEDITOR') {
echo '<td class="dataTableContent" align="left" colspan="4">';
$oFCKeditor = new FCKeditor('news_article_text[' . $lang['id'] . ']') ;
$oFCKeditor->Value = (($news_article_text[$lang['id']]) ? stripslashes($news_article_text[$lang['id']]) : news_get_news_article_text($nInfo->article_id, $lang['id']));
$oFCKeditor->Width = '97%' ;
$oFCKeditor->Height = '400' ;
$output = $oFCKeditor->CreateHtml() ;
echo '<br />' . $outtut . '</td>';
} elseif ($_SESSION['html_editor_preference_status']=='HTMLAREA') {
That should do it!
Best regards to the zen community!
Thank you for posting the fix. Would you be so kind to please attached the changed news.php file to this thread?
-
1 Attachment(s)
"Languages" and "Store Product Link" Loop
I found another error that was making my news edit page take almost 5 minutes to show.
Everytime you want to insert or edit an article, the "Store product link" gets all the products from the database. I have 12 languages in my store (s) and almost 600 products.
The problem is that the 1st language was getting 600 produtcs, the 2nd language 1200, the 3rd 1800 products and so on... when the page finished loading i had 46800 product links in dropdown menus on a single page.
A big problem with an easy solution
Find:
Code:
$dropdown_products = $db->Execute("select p.products_id, pd.products_name from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd where pd.products_id = p.products_id and pd.language_id = '" . (int)$lang['id'] . "' order by pd.products_name");
$dropdown_products_array[] = array(
'id' => '',
'text' => TEXT_PLEASE_SELECT,
);
while (!$dropdown_products->EOF) {
$dropdown_products_array[] = array(
'id' => $dropdown_products->fields['products_id'],
'text' => $dropdown_products->fields['products_name'],
);
$dropdown_products->MoveNext();
}
and move it before:
Code:
foreach ($languages as $i => $lang) {
This way it's outside the loop!
I'm attaching the file "news.php" in zip format.
Regards
-
Re: "Languages" and "Store Product Link" Loop
If you wish to use FCKeditor for newsletters, there is a one line fix here:
http://www.zen-cart.com/forum/showthread.php?t=58779
-
Re: News & Article Management
I've had this installed for a while now, and working fine, until I upgraded to 1.3.7.
Now, it looks like this: http://play2winbilliards.com/index.php?main_page=news
My right column is pushed way to the bottom, and I can't for the life of me figure out where this is falling apart.........
Any ideas?
-
Re: FCKeditor problem solved
Quote:
Originally Posted by
rikreations
You need to change the file /admin/news.php
Find (around line 205):
Code:
// HTML Editors support
if (HTML_EDITOR_PREFERENCE == 'FCKEDITOR') {
require(DIR_WS_INCLUDES . 'fckeditor.php');
} elseif (HTML_EDITOR_PREFERENCE == 'HTMLAREA') {
require(DIR_WS_INCLUDES . 'htmlarea.php');
}
and replace with:
Code:
if ($editor_handler != '') include ($editor_handler);
-
Re: News & Article Management
Thanks a_berezin, that's what i was looking for!
The method i used was for the "old days"... :)