TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,990
  • Total Topics: 21,323
  • Online today: 633
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 314
  • Total: 314

Initialization Script

Started by Thalov, July 10, 2007, 08:04:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Thalov

I was thinking of making an initialization script to make it easier to share some coding I've done with friends. While I know how to do the mySQL side of going through and creating all the tables and having all the php and css files in place, what I'm unsure of is how to create articles automatically with php.

Any kinds of script for this around somewhere? Or perhaps some lines of script that would allow the admin to use a single php file to create several articles at one time with the content he wants in them?

Thanks

Thalov

Perhaps a different way of asking this would be:

When TP creates new pages - what is the script for it? Does it store them in a table somewhere, so that their values can easily be changed?

G6Cad

Yes, the articles are saved in the database.
The easiest way to look how it's made is to look in the tp sourcefiles.

IchBin

smf_tp_articles is where the article info is stored. You can grab all the data you need from there. Check out the block code snippets for "latest articles" to see how you can grab this information.

Thalov

Thanks IchBin - that should help out.

This website is proudly hosted on Crocweb Cloud Website Hosting.