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

Recent

Welcome to TinyPortal. Please login or sign up.

March 29, 2024, 10:19:29 AM

Login with username, password and session length
Members
Stats
  • Total Posts: 195,106
  • Total Topics: 21,213
  • Online today: 358
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 0
  • Guests: 119
  • Total: 119

Can I call an SQL database in my PHP article block?

Started by dazebed, April 12, 2015, 03:01:15 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

dazebed

Bit confused about where to post this question,, apologizing in advance if it is in the wrong board. It might belong on the Themes board, although it's not specifically about either Block's themes or Jeff's or anyone else's. Mods please feel free to move it.

I am trying to decide between presenting some PHP/SQL tables that I already have linked to my forum, as an external article, or to edit them to work in a PHP article. The new 1.0 version of TP has many features I am not familliar with.

Link to my forum: http://www.yourdomain.com/forum/
SMF version: SMF ver. here 2.0.9
TP version: TP ver. here 1.0
Default Forum Language: Your Default Forum Language here English
Theme name and version: Theme name here Default,for now
Browser Name and Version: Browser name/version here Safari
Mods installed: Mods listed here None yet
Related Error messages: Error message here None yet

A bit more detail:  I had some web pages with some information on them, outside my SMF/TP forum,that were linked to my forum on the menu bar. I would like to use a TP article, if possible, to present that information on my forum, which I am currently rebuilding.I am using a test forum right now so unfortunately I cannot provide a link.

The external, linked pages included some tables of information which was called up from an SQL database I created outside my SMF database but in my domain.

I would like to use a TP article to display the table(S) instead of just linking to them on the menu bar. I am not sure if I should just post them as an "external page" through TP, or use a PHP page.

I had a number of files within the directory for these pages. 1) a style sheet for them  2) a menu which was called up with PHP on each of the pages (I wont need that since I can create a menu page in TP) and 2) the necessary files to create and access the database (dbcreatetable, dbaccess, dbconnect) 4) the files created for viewing,popuating and updating  the tables  5) the individual pages that the forum users saw when they wanted to look up something, and 6) some art for the pages (folders full of photos mostly)

Im pretty sure I can put the styles on the Article page as inline styles, and it is easy to link to pictures anywhere, but not sure where to put everything else. Would I just put them into the TP folder somewhere, and if so where? in the top level?

I guess at the heart of my question is... where would the tables work best?  Would putting them into a PHP article make them slower Would they be slower in an external page? Would they be better protected on a PHP page or as a exteral article? Would people without passwords be able to access them as external pages? (What security would there be for the external pages?)

Thanks in advance,
Laura


dazebed

BTW I am searching for the docs to TP.I found some very old ones from 2006, and some incomplete ones that someone wrote when 1.0 was released but there are many empty pages in them. They are helpful to some degree but not enough for my needs unfortunately as posted above

Is there some chance that the docs will be completed soon? I'd like to see some explanation of some of the newer features of TP that I am unfamilliar with, without having to search the entire community site.

Thanks again in advance.
:)

bloc

I don't think any docs will help you with this, even if they are not written, as the way you have your work setup it will not fit within TP confines anyway. Essentially you have to write your own rendering page - perhaps in just an php article - but TP will not be able to just drag them out of a database. It expects articles to be already formatted and put into the tp-articles table.

"external" articles mean linking to a plain HTML or PHP article. SO if your articles were already on that format, it would just be a matter of linking each one into a empty TP article.

But back to the docs: ask away if you need clarification on how things work, thats probabaly faster than waiting for any updated in-depth docs on TP.

dazebed

Awwww.... rats! 

I suspected as much actually Bloc. Just kind of hoped to fit all of the little boxes more neatly inside each other. But I will keep things as they are now I guess.

BTW nice to speak to you, I really love TP and SMF.  They have worked great for me for 8 years. And I believe it is still important for us to have them available. We cannot let the net become a place where large businsses own all of our content.

Best regards to you and all the cool people at TP