Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 11:44 am EST
Geeklog Forums
MySQL inside a Geeklog frame?
ohNoes!
Anonymous
I have a website for my gaming guild, and would like to implement a database program into the site that allows me to extract info to/from the game directly to the webserver. The database is called EQdkp.
My site is here ----> My site
Geeklog uses one MySQL database on my server, and EQdkp uses another. I already have EQdkp installed and running, here -----> My EQdkp
I would like to integrate it inside of the main frame though, the same way the news posts, forums, etc are, with the same result as this site has with their EQdkp integration --------> Their EQdkp
How would I go about this?
My site is here ----> My site
Geeklog uses one MySQL database on my server, and EQdkp uses another. I already have EQdkp installed and running, here -----> My EQdkp
I would like to integrate it inside of the main frame though, the same way the news posts, forums, etc are, with the same result as this site has with their EQdkp integration --------> Their EQdkp
How would I go about this?
6
5
Quote
Status: offline
vinny
Site Admin
Admin
Registered: 06/24/02
Posts: 352
Location:Colorado, USA
I've never had two DB connections open at the same time, though I know its possible. The basics for wrapping a page in Geeklog is:
require_once '/path/to/lib-common.php';
$output = COM_siteHeader();
/* your pages logic and content here */
$output .= 'You content here';
$output .= COM_siteFooter();
echo $output;
Is that along the lines of what you were looking for?
-Vinny
Text Formatted Code
require_once '/path/to/lib-common.php';
$output = COM_siteHeader();
/* your pages logic and content here */
$output .= 'You content here';
$output .= COM_siteFooter();
echo $output;
Is that along the lines of what you were looking for?
-Vinny
4
5
Quote
ohNoes!
Anonymous
Hmm, maybe. Let me play around with it.
4
5
Quote
Status: offline
DTrumbower
Forum User
Moderator
Registered: 01/08/03
Posts: 507
You could always make a dynamic, staticpage. Enable PHP and put your code in it.
2
3
Quote
ohNoes!
Anonymous
Hmmm...this sounds like it might be what I'm looking for. It's been months since I installed Geeklog though, and what little PHP I learned then, I've forgotten now. =/
I'm not sure how I would put that database into a static page.
I want THIS to appear HERE, just like a regular static page would. If I can make that happen, I imagine I can figure out how to apply the site style to it.
I'm not sure how I would put that database into a static page.
I want THIS to appear HERE, just like a regular static page would. If I can make that happen, I imagine I can figure out how to apply the site style to it.
5
5
Quote
Status: offline
DTrumbower
Forum User
Moderator
Registered: 01/08/03
Posts: 507
This is an example of an alphabetic listing from the file management plugin. I created a static page and inserted this code. For your example, you would want to add database connection logic.
$sql = "SELECT title, url,unix_timestamp(date) AS day, description";
$sql .= " FROM gl_filemgmt_filedetail a, gl_filemgmt_filedesc b";
$sql .= " WHERE a.lid = b.lid and (date <= NOW()) ";
$order = " ORDER BY title ASC";
$recs = DB_query($sql . $order);
$nrows = DB_numRows($recs);
$display .= "<ul>";
for ($x = 0; $x < $nrows; $x++) {
$A = DB_fetchArray($recs);
$display .= "<p><li>". '<a href=http://www.hockeycoachingabcs.com/filemgmt_data/files/' . $A['url'] . '>' . stripslashes($A['title']) . "<a>" . "<br>" . stripslashes($A[description]);
$display .= '</li>';
}
$display .= '</ul>';
return $display;
Text Formatted Code
$sql = "SELECT title, url,unix_timestamp(date) AS day, description";
$sql .= " FROM gl_filemgmt_filedetail a, gl_filemgmt_filedesc b";
$sql .= " WHERE a.lid = b.lid and (date <= NOW()) ";
$order = " ORDER BY title ASC";
$recs = DB_query($sql . $order);
$nrows = DB_numRows($recs);
$display .= "<ul>";
for ($x = 0; $x < $nrows; $x++) {
$A = DB_fetchArray($recs);
$display .= "<p><li>". '<a href=http://www.hockeycoachingabcs.com/filemgmt_data/files/' . $A['url'] . '>' . stripslashes($A['title']) . "<a>" . "<br>" . stripslashes($A[description]);
$display .= '</li>';
}
$display .= '</ul>';
return $display;
3
5
Quote
All times are EST. The time is now 11:44 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