Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: CREATE A ''bar Latest News" A new way Just in Snews FILE  (Read 1600 times)

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
CREATE A ''bar Latest News" A new way Just in Snews FILE
« on: July 15, 2010, 10:19:44 AM »

 ??? ???
« Last Edit: April 15, 2012, 03:43:28 PM by adminphp »
Logged
“Fifty years of programming language research, and we end up with C++?”

Keyrocks

  • Doug
  • ULTIMATE member
  • ******
  • Karma: 449
  • Posts: 6019
  • Semantically Challenged
    • snews.ca
Re: CREATE A ''bar Latest News" A new way Just in Snews FILE
« Reply #1 on: July 15, 2010, 04:48:51 PM »

I want to create a''bar Latest News "and I have found in the file snews.php in function // MENU ARTICLES
A new way to do that... Look at the label written in red <li>to </li> (look at the function inside)
You must delete those tags. Because it is controlled in a view "Latest News" .

What do you think if you can Is this the way that we rely on so it does not take much time or writing new functions only replace these marks and add the code to activate the headlines.

Here is what I think.
If you no longer need // MENU ARTICLES to produce its list of articles in a vertical format, then it would be OK to simply remove the <li> </li> tags within the function. In which case you would also want to remove the <ul> </ul> tags that wrap it in the index.php (template) file... there's no need for <ul> tags if there are no <li> tags.

However, if you think you might want to use // MENU ARTICLES as-is (in its default state) at some time in the future, you could simply:
    1. Copy and paste the function below it,
    2. Change the function name from menu_articles to latest_articles_bar
    3. Remove the <li> </li> tags,
    4. Use the new function-name in your index.php file where you want it to show as <?php latest_articles_bar(0,10); ?>

You would now have a new purpose-specific function.
That way, you can still use (in index.php) menu_articles(0,10); for a default vertical articles list without having to make any changes in snews.php.
Logged
Do it now... later may not come.
-------------------------------------------------------------------------------------------------
sNews 1.6 MESU | sNews 1.6 MEMU

adminphp

  • Full Member
  • ***
  • Karma: 4
  • Posts: 150
  • you must be a great snewser .
Re: CREATE A ''bar Latest News" A new way Just in Snews FILE
« Reply #2 on: July 15, 2010, 07:45:13 PM »

 ??? ???
« Last Edit: April 15, 2012, 03:45:06 PM by adminphp »
Logged
“Fifty years of programming language research, and we end up with C++?”