![]() |
Showing data from the database
So, I've spent the last 5 hours rewriting an old modification, making something new out of it, and I am now stuck at a point where I don't know what to do next lol
Basically, I made a random quote database (and it works too :D (I think)), I just need to find out how to show the quote and the author on the forum side now. This is actually my first time making something this extensive in the AdminCP :eek: Anyway, upon installation, I've made it so it'll add predefined quotes to the database, which looks something like: Code:
$db->hide_errors(); Thanks in advance :D |
1 Attachment(s)
Here's the screenshot of what I have so far :D
https://vborg.vbsupport.ru/attachmen...1&d=1324523992 |
Are you asking for help displaying these on the forums and are wondering how to put them there?
|
Quote:
If the id = 1, then it shows "Quote 1 - Author 1", if the id = 2, then it shows "Quote 2 - Author 2", etc, etc. |
So you do the query for the quote..
PHP Code:
PHP Code:
HTML Code:
{vb:raw myquote.quote} Is that what you were asking? |
1 Attachment(s)
I think so. I've attached the file to show the contents of what I currently have. Now my question is, if I use:
PHP Code:
(I'm not too experienced with queries at all :o. Just trying re-create a different mod to do what I want :D) EDIT: oops, forgot to attach the file lol. Anyway, this is going to be located at /admincp/quotesdb.php PHP Code:
|
I think I found something that would work how I need.....
PHP Code:
PHP Code:
--------------- Added [DATE]1324604070[/DATE] at [TIME]1324604070[/TIME] --------------- Woohoo! I've got it working (I think)! Now to tidy everything up :D One more question....the columns in the admincp (ID, Author, Quote, Action), is it possible to make those a fixed width? |
The text areas are the size that you define for the <input> area.
Glad you got it working. :) |
I mean the column width for the columns in the top table. Like, for example, maybe make the ID column 10px wide and the other Action column around 200px wide and I guess the others would expand with what room is left :)
--------------- Added [DATE]1324623736[/DATE] at [TIME]1324623736[/TIME] --------------- Figured that out as well. Got the code from admincp/block.php :) What I did was, above: PHP Code:
PHP Code:
|
All times are GMT. The time now is 10:36 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|