Jump to content
  • 0
Sign in to follow this  
Followers 0

My News system

Question

Posted

Ok i made a news system

Mainly because i wanted to see if i could do it

Ignore the actual site layout it was just thrown together so i could work on it as if it was part of a site

Is there anything you would add?
Anything you would change?
anything you would remove?

[url="http://www.haggistech.co.uk/news/index.php"]http://www.haggistech.co.uk/news[/url]
1 person likes this

Share this post


Link to post
Share on other sites

31 answers to this question

  • 0

Posted

Sweet! Looks awesome so far. Good work!!
1 person likes this

Share this post


Link to post
Share on other sites
  • 0

Posted

Thanks

Been working on it for a wee while now just in between work etc

the main page i feel is about finished maybe some small tweaks

Totally lost on admin page though

Share this post


Link to post
Share on other sites
  • 0

Posted

If you're not sure what to do for the admin page.
Look at bootstrap
http://twitter.github.com/bootstrap/
You can whip up a decent looking administration backend pretty quickly.

As for functionality, you will want to include things like comment moderation, News CRUD. A user CRUD also.

Share this post


Link to post
Share on other sites
  • 0

Posted

Very good work, it's nice, clean and does it's job - just a couple of things:

- index.php?page=comments&id=54 - you should definitely use a slug: /facebook-hosting-windows-8-hackathon, page=comments is not a good representation
- also show news title in the page <title></title>, it still says Home even when it's not on 'home'
- [color=#686868][font=arial, verdana, helvetica, sans-serif][size=3][left]Posted by: Haggis @ November 30, 2012[/left][/size][/font][/color] .. you can't post something at @ a date.

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='Uplift' timestamp='1362497512' post='595559174']
Very good work, it's nice, clean and does it's job - just a couple of things:

- index.php?page=comments&id=54 - you should definitely use a slug: /facebook-hosting-windows-8-hackathon, page=comments is not a good representation
- also show news title in the page <title></title>, it still says Home even when it's not on 'home'
-
[left]Posted by: Haggis @ November 30, 2012[/left]
.. you can't post something at @ a date.
[/quote]


Why is it not good to use ?page=comments for example?

I will fix the @ to on lol

and yeah the | home i will fix too

thanks :)

Share this post


Link to post
Share on other sites
  • 0

Posted

Isn't it SEO indexing? You'll get more hits from search engines if the title is in the link...

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='Haggis' timestamp='1362499425' post='595559284']
Why is it not good to use ?page=comments for example?

I will fix the @ to on lol

and yeah the | home i will fix too

thanks :)
[/quote]

Just my personal take on it: it's not really a comments page, it's a news page with comment functionality... Using something like the page/news title as the url is much more relevant.

And as above.. SEO purposes.

Share this post


Link to post
Share on other sites
  • 0

Posted

It works but needs a lot of css styling. It's looks like a shell only.

Share this post


Link to post
Share on other sites
  • 0

Posted

You forgot to validate the ID

http://www.haggistech.co.uk/news/index.php?page=comments&id=mouhhaha

will give a mysql error...

Good job for a first try :) !

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='ACTIONpack' timestamp='1362508524' post='595559624']
It works but needs a lot of css styling. It's looks like a shell only.
[/quote]

Did you read the first post?

in particular thisbit

[quote]Ignore the actual site layout it was just thrown together so i could work on it as if it was part of a site
[/quote]


[quote name='kyosuken' timestamp='1362513678' post='595559782']
You forgot to validate the ID

[url="http://www.haggistech.co.uk/news/index.php?page=comments&id=mouhhaha"]http://www.haggistec...nts&id=mouhhaha[/url]

will give a mysql error...

Good job for a first try :) !
[/quote]


Thank you, i will fix that :)

Share this post


Link to post
Share on other sites
  • 0

Posted

What check are you doing on the ID to ensure it's legit?

Share this post


Link to post
Share on other sites
  • 0

Posted

Its been so long since i did that bit of code i will ahve to check lol

Share this post


Link to post
Share on other sites
  • 0

Posted

i am escaping the string and should now not work like that

this should work now

[url="http://www.haggistech.co.uk/news/index.php?page=comments&id=muhahah"]http://www.haggistech.co.uk/news/index.php?page=comments&id=muhahah[/url]

Share this post


Link to post
Share on other sites
  • 0

Posted

yeah i tried to hijack it using the id and every attempt failed.

Share this post


Link to post
Share on other sites
  • 0

Posted

Awesome :)

Share this post


Link to post
Share on other sites
  • 0

Posted

[quote name='Haggis' timestamp='1362571815' post='595561026']
i am escaping the string and should now not work like that

this should work now

[url="http://www.haggistech.co.uk/news/index.php?page=comments&id=muhahah"]http://www.haggistec...ents&id=muhahah[/url]
[/quote]

escaping...assuming you're using mysqli_real_escape_string then?
Not necessarily secure from what I've read.

Thoughts on:
[CODE]
$id = preg_match("/^[0-9]+$/", $_GET['id']);
[/CODE]

Doing anything on the page= btw?

Share this post


Link to post
Share on other sites
  • 0

Posted

yeah looking at the page= thing but not got a lot of time right now

so getting rid of the small problems first :)

Share this post


Link to post
Share on other sites
  • 0

Posted

is the page used in the query? if not, no need to worry. only need to worry about things directly used in the query really.

Share this post


Link to post
Share on other sites
  • 0

Posted

nah page is not used in the query only the id

I thought you meant the SEO stuff lol

Share this post


Link to post
Share on other sites
  • 0

Posted

These days it's a bit of a myth about the address affecting SEO. Always a good idea to include the title though simply because people search for words.

/news/index.php?page=comments&id=54 isn't brilliant.
/news/index.php?page=comments&title=facebook-hosting-windows-8-hackathon is better (and Google can understand query strings)

My own personal blog that I'm creating uses entry.php?entry=title-of-post&category=category-of-post

Share this post


Link to post
Share on other sites
  • 0

Posted

hmmm never thought about that :) i will have a look

Share this post


Link to post
Share on other sites
  • 0

Posted

http://www.generateit.net/mod-rewrite/

use it, and get rid of [b]unnecessary-page-name.php?=[/b]

Share this post


Link to post
Share on other sites
  • 0

Posted

little interim fix

[url="http://www.haggistech.co.uk/news/index.php?page=comments&title=Facebook-hosting-Windows-8-hackathon"]http://www.haggistech.co.uk/news/index.php?page=comments&title=Facebook-hosting-Windows-8-hackathon[/url]

Share this post


Link to post
Share on other sites
  • 0

Posted

ok got the mod_rewrite stuff working

does this look better now?

[url="http://haggistech.co.uk/news/"]http://haggistech.co.uk/news/[/url]

Share this post


Link to post
Share on other sites
  • 0

Posted

haha nice work mate!!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0

  • Recently Browsing   0 members

    No registered users viewing this page.