Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Problems with "Extra"  (Read 2388 times)

Aein

  • Newbie
  • *
  • Karma: 0
  • Posts: 9
Problems with "Extra"
« on: August 25, 2007, 03:46:54 am »

I cannot seem to get extra to show up ... and somehow I can't even edit the extra I've already posted? I'm very confused as I'm not that great with php.

I want the extra to be just a welcome on the index page only, is there any way I can do this? Or even have another way?


I tried changing index.php to articles.php (including all of the mentions of index.php to articles.php in snews & htaccess) but since I already posted with index.php, the search function stopped working and I couldn't edit the previous posts without manually changing the index.php to articles.php in the browser bar. I just want a welcome message on the main page but I'm unsure of how to go about this.
« Last Edit: August 25, 2007, 04:07:37 am by Aein »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Problems with "Extra"
« Reply #1 on: August 25, 2007, 03:56:02 am »

in admin, edit the extra you want for home page.
under
Appear only on Category:
select Home.

Hope that is what you were after.
Logged
Of all the things I have lost, it is my mind that I miss the most.

Aein

  • Newbie
  • *
  • Karma: 0
  • Posts: 9
Re: Problems with "Extra"
« Reply #2 on: August 25, 2007, 04:08:48 am »

Oh wow, I made it more difficult than it seemed. Thanks so much. :)
Logged

Aein

  • Newbie
  • *
  • Karma: 0
  • Posts: 9
Re: Problems with "Extra"
« Reply #3 on: August 25, 2007, 04:13:19 am »

Oh, but not only does it appear on the index, it also appears on every other "page" like archives, site map, etc. I only want it on the index. :(
Logged

Joost

  • Guest
Re: Problems with "Extra"
« Reply #4 on: August 25, 2007, 08:53:45 am »

You can set a page with a welcome message as frontpage, in the admin panel. But no articles will be shown.
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Problems with "Extra"
« Reply #5 on: August 25, 2007, 05:09:33 pm »

You can try to change this in index.php:
Code: [Select]
<?php extra(); ?>
to following:
Code: [Select]
<?php
$curItem 
getContentKeyData(); 
$itemType $curItem['itemType'];
if (
$itemType == 'home') {
   
extra();
}
?>

Code updated at 26/08/2007 to add missing ;

Note, that for this to work You should either put in snews.php or include from separate file function getContentKeyData() from this addon [LIB] Function to determine content type, sef and id (v.1.6, 1.5.*).
« Last Edit: August 26, 2007, 09:19:43 am by codetwist »
Logged

Aein

  • Newbie
  • *
  • Karma: 0
  • Posts: 9
Re: Problems with "Extra"
« Reply #6 on: August 25, 2007, 11:11:09 pm »

You can set a page with a welcome message as frontpage, in the admin panel. But no articles will be shown.

How would I do this? I don't need to show articles on the main page.



Note, that for this to work You should either put in snews.php or include from separate file function getContentKeyData() from this addon [LIB] Function to determine content type, sef and id (v.1.6, 1.5.*).

Everytime I put your code into snews, my layout won't show up. :<


Thanks for all your suggestions, everyone. :)
« Last Edit: August 25, 2007, 11:24:37 pm by Aein »
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Problems with "Extra"
« Reply #7 on: August 26, 2007, 02:27:24 am »

You can set a page with a welcome message as frontpage, in the admin panel. But no articles will be shown.
How would I do this? I don't need to show articles on the main page.
Ah, to do this, you first create a page-type article with content, that will remain as your entry.
Then in admin>>settings>>content
Use Page as Home Page: <select page>
Logged
Of all the things I have lost, it is my mind that I miss the most.

Aein

  • Newbie
  • *
  • Karma: 0
  • Posts: 9
Re: Problems with "Extra"
« Reply #8 on: August 26, 2007, 02:32:57 am »

You can set a page with a welcome message as frontpage, in the admin panel. But no articles will be shown.
How would I do this? I don't need to show articles on the main page.
Ah, to do this, you first create a page-type article with content, that will remain as your entry.
Then in admin>>settings>>content
Use Page as Home Page: <select page>

Thank you!  ;D This is exactly what I needed!!
Logged

philmoz

  • High flyer
  • ULTIMATE member
  • ******
  • Karma: 161
  • Posts: 1988
    • fiddle 'n fly
Re: Problems with "Extra"
« Reply #9 on: August 26, 2007, 02:37:50 am »

however, the extra content will still show for all page-type articles...

we really, really need a 'none' option I think ;)
Logged
Of all the things I have lost, it is my mind that I miss the most.

lessismore

  • Jr. Member
  • **
  • Karma: 0
  • Posts: 67
Re: Problems with "Extra"
« Reply #10 on: August 26, 2007, 05:30:44 am »

however, the extra content will still show for all page-type articles...

we really, really need a 'none' option I think ;)

Was trying to get one "extra" to only show up on the home page - but couldn't get it to work.
Thanks to your comment - I now understand the extra behavior prohibits that (and I support your conclusion).
Logged

codetwist

  • Hero Member
  • *****
  • Karma: 50
  • Posts: 940
Re: Problems with "Extra"
« Reply #11 on: August 26, 2007, 09:21:35 am »

Everytime I put your code into snews, my layout won't show up. :<

There was typo (missing ;) in that code; fixed code.
Logged