Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 [3] 4

Author Topic: [MOD] Body and ID, a modification I need help with!  (Read 15148 times)

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
[MOD] Body and ID, a modification I need help with!
« Reply #30 on: March 03, 2006, 07:25:07 am »

Yea, it's real fun...except I feel backwards-thinking. It really is flipped around this thinking. I remember that from way back when I did some cheating in visual basic...Don't compare languages here, but the backwards approach is the same ;)
Logged
"It's only dead fish that goes with the flow... "
Updated

bryn

  • Hero Member
  • *****
  • Karma: 2
  • Posts: 934
    • http://www.cssugly.com
[MOD] Body and ID, a modification I need help with!
« Reply #31 on: March 03, 2006, 09:22:44 am »

I know what you mean..it got hectic for my head too at the start..I tend to think this way:

'It's ok to display this on the page, but not if you are here, here,..or here'..so I write the else statement first, and then put in the conditions.

Takes some getting used to but damn it's handy as hell..takes sNews to a whole new level of functionality ;D
Logged
Over 1,000 posts of joy, sNews is not only brilliant, but fun too! thanks guys :D

Patric Ahlqvist

  • Nobodys perfect, but Im pretty effing close
  • ULTIMATE member
  • ******
  • Karma: 65
  • Posts: 4867
  • I'm a self-made man and worships my creator.
    • p-ahlqvist.com
[MOD] Body and ID, a modification I need help with!
« Reply #32 on: March 03, 2006, 09:26:45 am »

Yea...It's only that I feel i need more of...guideance before I manage to think this way by myself. Eg...I put in a manual link...such as...a link to a page out of sNews, but on the site...ie - guestbook.php...That would popup in the narrow center column if I don't do anything...but here my mind plays tricks on me ;)...

I'm not there yet...to insert a GB I mean, but I will once I redo my regular site and "sNewsing it up" a bit :)
Logged
"It's only dead fish that goes with the flow... "
Updated

bryn

  • Hero Member
  • *****
  • Karma: 2
  • Posts: 934
    • http://www.cssugly.com
[MOD] Body and ID, a modification I need help with!
« Reply #33 on: March 03, 2006, 09:49:17 am »

I sometimes write a line..

'display this if this this and these conditions are met'

helps me to make sure that I have the page logic and flow correct..of course a pen and paper also works wonders..I draw a visual site map with boxes a bit like a flow chart..I do this for all pages anyways! I find actually drawing it helps with my thinking, mainly because I am also using this to display page specific ads and external rss feeds to keep content fresh and interesting

rotators are your friend ;D
Logged
Over 1,000 posts of joy, sNews is not only brilliant, but fun too! thanks guys :D

Tjobbe

  • Full Member
  • ***
  • Karma: 0
  • Posts: 112
    • http://www.farstyle.com
[MOD] Body and ID, a modification I need help with!
« Reply #34 on: March 10, 2006, 09:40:29 am »

Quote from: Tjobbe
I've been trying the following;

Code: [Select]
echo "personal";
} else if (get_id('article') == "Web Design") {
echo "webdesign";
} else if (get_id('article') == "Contact") {
echo "contact";
} else {
echo "home";
} ?>">

but all it is doing is calling id="home" when i select a different category.

what it should do is rename the body id depending on the category selected, what is it im doing wrong?


What is it I'm doing wrong here? I've tried re-writing it and it looks like its right.

Basically, it needs to echo whatever the category is thats being displayed.

Can anyone point to me what it is I'm doing horribly wrong?
Logged

Tjobbe

  • Full Member
  • ***
  • Karma: 0
  • Posts: 112
    • http://www.farstyle.com
[MOD] Body and ID, a modification I need help with!
« Reply #35 on: March 20, 2006, 02:59:01 pm »

Still no-one with any tips on how to do this  ;D ???  ;)
Logged

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1717
    • http://www.snewscms.com
[MOD] Body and ID, a modification I need help with!
« Reply #36 on: March 20, 2006, 03:37:20 pm »

Quote from: Tjobbe
Still no-one with any tips on how to do this  ;D ???  ;)

Hehe, sorry mate.

get_id('article') == "Web Design"

get_id('article') == "web-design"

You need to enter SEF title, not title.

Hope it helps  ;D

Logged

Tjobbe

  • Full Member
  • ***
  • Karma: 0
  • Posts: 112
    • http://www.farstyle.com
[MOD] Body and ID, a modification I need help with!
« Reply #37 on: March 20, 2006, 04:18:22 pm »

Thanks Luka, I hope it works!  ;)
Logged

Tjobbe

  • Full Member
  • ***
  • Karma: 0
  • Posts: 112
    • http://www.farstyle.com
[MOD] Body and ID, a modification I need help with!
« Reply #38 on: March 20, 2006, 04:23:26 pm »

Very strange!

I have no idea what its doing, but it isn't doing what is being asked:

Quote
echo "personal";
} else if (get_id('article') == "web_design") {
echo "webdesign";
} else if (get_id('article') == "contact") {
echo "contact";
} else {
echo "home";
} ?>">

Is always echoing "home". What am i doing  disastrously wrong?
Logged

Tjobbe

  • Full Member
  • ***
  • Karma: 0
  • Posts: 112
    • http://www.farstyle.com
[MOD] Body and ID, a modification I need help with!
« Reply #39 on: March 30, 2006, 05:23:35 pm »

- Just on the off-chance that someone is looking at this, I'd love to find out if anyone knows how to fix this..  ;)
Logged

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1717
    • http://www.snewscms.com
[MOD] Body and ID, a modification I need help with!
« Reply #40 on: March 30, 2006, 06:50:15 pm »

I see that a lot of people what to do this thing so I'll post tutorial tonight about that. Until now, see this example:


Index.php

Code: [Select]


Download sNews


single file, php and mysql powered, standards valid content management system




sNews2GO


sNews packed with a template of your choice for easy installation




Free CSS Templates


Download Free CSS Templates to use on your site or for learning or inspiration




Solucija


Solucija is a site devoted to information architecture, web standards and web design.



right();
} ?>


Logged

Tjobbe

  • Full Member
  • ***
  • Karma: 0
  • Posts: 112
    • http://www.farstyle.com
[MOD] Body and ID, a modification I need help with!
« Reply #41 on: March 30, 2006, 07:02:07 pm »

Woohoo!!

Thanks Luka, thats exactly what I needed, a slight modification and it works great, FYI, I used this code:

Code: [Select]

personal


webdesign


contact

echo "home" ;
} ?>">
Logged

Luka

  • Administrator
  • ULTIMATE member
  • ******
  • Karma: 36
  • Posts: 1717
    • http://www.snewscms.com
[MOD] Body and ID, a modification I need help with!
« Reply #42 on: March 30, 2006, 07:04:10 pm »

Quote from: Tjobbe
Woohoo!!

Thanks Luka, thats exactly what I needed, a slight modification and it works great, FYI, I used this code:


I'm glad it worked!  ;D

Hehe, I wrote until now...

The rain in Spain stays mainly in the plain.
Logged

bryn

  • Hero Member
  • *****
  • Karma: 2
  • Posts: 934
    • http://www.cssugly.com
[MOD] Body and ID, a modification I need help with!
« Reply #43 on: March 30, 2006, 07:32:21 pm »

phaaaa! ;D

How are the docs coming on Luka?

quote:

'Little Jack Horner, sat in the corner..eating his words away'

endquote:
Logged
Over 1,000 posts of joy, sNews is not only brilliant, but fun too! thanks guys :D

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
[MOD] Body and ID, a modification I need help with!
« Reply #44 on: April 02, 2006, 09:38:00 pm »

I've tried this too, and I've got a few questions:

- Tjobbe, did you use or did you code the navigation (Home Blog Webdesign Contact) yourself?
- Will it be possible to code sNews in a way that it can do this itself? So if you're in category Home, then in which is the navigation the Home link will have a different look than the other categories' links?
Logged
Pages: 1 2 [3] 4