Page 20 of 46 FirstFirst ... 10181920212230 ... LastLast
Results 191 to 200 of 451
  1. #191
    Join Date
    Feb 2008
    Posts
    29
    Plugin Contributions
    0

    Default Re: News & Article Management

    Hi Kruna. :) Thanks for answering. Not quite what I was looking for, but a nice work around. I like it. :) I think I will borrow it. Thanks again. :) Have a great day.

    And PS if anyone can still answer the original ? Feel free. :) *waves*


    Kate

  2. #192
    Join Date
    Feb 2008
    Posts
    29
    Plugin Contributions
    0

    Default Re: News & Article Management

    I got it to work on the Main page. :) YAY! Just so that anyone reading this wont run into the same thing:

    The install directions tell you to put this line of code:

    PHP Code:
    <?php include(DIR_WS_MODULES zen_get_module_directory(FILENAME_NEWS_SUMMARY_MODULE)); ?>
    somewhere in this file:

    includes/templates/template_default/templates/tpl_index_default.php
    The file you need to put it in is actually tpl_index_categories.php. :) I am still playing around with placement but everything works great for now. :)

    http://www.libragear.com/zencart/

    Have a wonderful and codey day!

    Kate

  3. #193
    Join Date
    Aug 2004
    Posts
    40
    Plugin Contributions
    0

    Default Re: News & Article Management

    Quote Originally Posted by libragear View Post
    I got it to work on the Main page. :) YAY! Just so that anyone reading this wont run into the same thing:

    The install directions tell you to put this line of code:

    PHP Code:
    <?php include(DIR_WS_MODULES zen_get_module_directory(FILENAME_NEWS_SUMMARY_MODULE)); ?>
    somewhere in this file:



    The file you need to put it in is actually tpl_index_categories.php. :) I am still playing around with placement but everything works great for now. :)

    http://www.libragear.com/zencart/

    Have a wonderful and codey day!

    Kate


    My luck is in ! I was just checking the forum to see if there was a way of placing the news page within my main page and here it is already !
    I intend to have my main page content divided into 2 or even 3 columns with the news in one of those columns and your little line of code is just what i was looking for.

    Fantastic and cheers !!

    Dylan

  4. #194
    Join Date
    Nov 2005
    Location
    France - Limoges
    Posts
    101
    Plugin Contributions
    0

    help question Re: News & Article Management

    Hi,

    I'm trying to concentrate on personalising the display on the news_summary and also on the news default...

    I'm having trouble to add a div around the image as I would like to personnalise just the image style on both these places. I'm not very familiar with php so unable to add the code that will display my div around the image.

    Not looking for someone to hold my hand from A to Z... but could you point me out in the right direction...

    I have tried modifying :
    IMG.articleImage { border: 3px double #9a9a9a; padding: 0; margin: 10px 10px 10px 10px;}

    in the css but this doesn't have any effect on my image display

    I can't give a direct link to a specific news, because I will be playing around with these... But basicaly you can see the news and access it on my home page here : www.NetJuggler.net

    Any advice would be greatly appreciated. Thanks in advance.

  5. #195
    Join Date
    Feb 2008
    Posts
    29
    Plugin Contributions
    0

    Default Re: News & Article Management

    Quote Originally Posted by Furrypotato View Post
    My luck is in ! I was just checking the forum to see if there was a way of placing the news page within my main page and here it is already !
    I intend to have my main page content divided into 2 or even 3 columns with the news in one of those columns and your little line of code is just what i was looking for.

    Fantastic and cheers !!

    Dylan
    Glad I could help. Just a side note though, when I turned the category table in the center column off I ended up having to put that line of code back in tpl_index_default.php. It worked like a charm. :). Good luck.

    Kate

  6. #196
    Join Date
    Aug 2004
    Posts
    40
    Plugin Contributions
    0

    Default Re: News & Article Management

    Quote Originally Posted by libragear View Post
    Glad I could help. Just a side note though, when I turned the category table in the center column off I ended up having to put that line of code back in tpl_index_default.php. It worked like a charm. :). Good luck.

    Kate
    One more question - is there a quick way of me putting the main news page into my front page in a similar way ?
    ie - is there a main news page equivalent to FILENAME_NEWS_SUMMARY_MODULE that I can substitute ?

    Or does it gt more complex if I was to put teh news page into it ?

    Dylan

  7. #197
    Join Date
    Nov 2005
    Posts
    86
    Plugin Contributions
    1

    Default Re: News & Article Management

    does anyone know of a quick way of getting more than one "main" story showing on the homepage.

    by main story i mean showning image, headline and intro text.

    I looked through the thread and couldn't find the answer, although its a long thread and I could have missed it.

    almost forgot... this is a brilliant contribution thanks Joshua

  8. #198
    Join Date
    Feb 2008
    Posts
    29
    Plugin Contributions
    0

    Default Re: News & Article Management

    Quote Originally Posted by steveyork136 View Post
    does anyone know of a quick way of getting more than one "main" story showing on the homepage.
    Hey Steve. :) I spent the morning searching for an answer, On one of the beginning pages of this post Joshua states that you cannot do this without reprogramming the mod. *sigh* I was hoping the answer was yes also. The only workaround I see is to make several posts a day, then at least the links show up there. lol. not very practical. There is an archive link though so people can see what came in the past. LA!

    Of course I am a fledgling in PHP, so there may be a way..

    :) Kate

  9. #199
    Join Date
    Nov 2005
    Posts
    86
    Plugin Contributions
    1

    Default Re: News & Article Management

    Thanks for the info Kate, I was hoping someone had done this and might save me the work, but as they haven't I guess I'll have a crack at it myself.

    If I do find a way I will post my solution for others.

  10. #200
    Join Date
    Nov 2005
    Posts
    86
    Plugin Contributions
    1

    Default Re: News & Article Management

    OK so I've had a go at changing the news summary on the homepage and I've got something working, but before you look please bear in mind my enthusiasm far out weighs my skill so the coding is probably not the best ever seen.

    Please bear in mind the following
    The amount of news items is set in the query (limit 5).
    It gets the last few articles added(5 in code) not sorted by date.
    I haven't done anything with the languages, so if you need translations, you'll need to code them in.
    There isn't any links to the news archive as the original, but you could add a simple href link if needed.
    There is no styling on it so you would need to add divs and class as required.
    It works for me, but that doesn't mean it will for you, please test extensively before using on live shop.

    That said I hope this helps somebody, and maybe give someone more talented than me a starting point to improve and tweak the code.
    This code replaced the code in the includes/modules/news_summary.php file



    <?php

    // this query uses part of the original news query, just simplified, if you need different languages that coding needs adding, to alter the amount of stories shown change the limit 5 to number required
    $comments = $db->Execute("select n.article_id, nt.news_article_name, nt.news_article_shorttext, n.news_image, nt.news_image_text from " . TABLE_NEWS_ARTICLES . " n left join " . TABLE_NEWS_ARTICLES_TEXT . " nt on n.article_id = nt.article_id where n.news_status = '1' order by n.article_id desc limit 5 ");
    while (!$comments->EOF)
    {
    // article_id is used for testing comment out when you ready to send this live
    echo $comments->fields['article_id'];?><br /><?


    echo $comments->fields['news_article_name'];?><br /><?
    echo $comments->fields['news_article_shorttext'];?><br /><?


    // get image for story
    if ((zen_not_null($comments->fields['news_image'])) && file_exists(DIR_FS_CATALOG . DIR_WS_IMAGES . $comments->fields['news_image'])) {
    $articleImage = zen_image(DIR_WS_IMAGES . $comments->fields['news_image'], $comments->fields['news_image_text'], '', '', ' ');
    echo $articleImage;
    }


    // get the url for the article and attach to a simple read more link
    $articleLink = zen_href_link(FILENAME_NEWS_ARTICLE, 'article_id=' . $comments->fields['article_id']);
    ?>
    <a href="<? echo $articleLink;?> ">Read more</a>
    <?
    // bit of space between articles, if you do this properly with css you can style this better
    ?><br /><br /><?

    $comments->MoveNext();
    }
    // need to add link to rest of news here if required

    ?>
    Last edited by steveyork136; 24 Feb 2008 at 10:34 AM. Reason: missed code out

 

 
Page 20 of 46 FirstFirst ... 10181920212230 ... LastLast

Similar Threads

  1. News & Article Management
    By akumi in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 13 May 2008, 03:27 PM
  2. Regarding News & Article Management
    By akumi in forum All Other Contributions/Addons
    Replies: 2
    Last Post: 12 May 2008, 05:27 PM
  3. News & Article Management- couple small problems
    By chufty bill in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 26 Oct 2006, 09:53 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR