Welcome to Geeklog, Anonymous Monday, November 25 2024 @ 04:37 am EST

Geeklog Forums

Adding "Slashdot" style "xxx-xxx-dept" to posted articles


Status: offline

MrPilot

Forum User
Newbie
Registered: 10/02/02
Posts: 9
Perhaps this would be the proper board to add this question to:

I would like to add a line to my displayed articles similar to the slashdot-style "xxx-xxx-dept" display. I have no idea where to begin, and I would like to do this myself. Where do I start? Would I just look at the "Adds the story to the database" section in story.php and add "$dept" code like the other parts of the article?

Or is this PHP newbie getting in way over his head? :-)

Thanks,
MrP
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
Do you want them all to be the same? Or do you want the story submitter to be able to choose a dept? Or do you want it to be random?
 Quote

MrPilot

Anonymous
I would like the story submitter to be able to make up whatever dept they want (with a reasonable character limit - maybe 50 or so) when they submit the story. The line would be in the format of "from the [whatever dept user makes up] dept". I imagine I could figure out how to edit the template file to add the surrounding text, I just need to know how to let the user compose a department and how to store and retrieve it from the gl_stories database table.

Thanks!

MrPilot
 Quote

Status: offline

Turias

Forum User
Full Member
Registered: 10/20/03
Posts: 807
That's going to require altering the table and doing a lot of hacking. Just examine the code where stories are added and retrieved from the database. You'll have to make quite a few changes, though.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by Turias: That's going to require altering the table

Also, please note that we do not recommend making changes to Geeklog's tables. Instead, you should create your own tables (which, I'm afraid, is even more work ...).

bye, Dirk
 Quote

All times are EST. The time is now 04:37 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content