We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Add Reply
how to find out MySQL database
Topic Started: Sep 7 2005, 05:31 PM (415 Views)
CrazyaZnBoii
Member
[ * ]
how to find out the link MySQL database username and password because I am trying to make a news thing from a forum but i dont know how to find out so anyone have any idea?
Offline Profile Quote Post Goto Top
 
Nemesis
+o0 1337 |=0|- j00
[ *  *  *  * ]
InvisionFree does not give you access to the MySQL database...
Offline Profile Quote Post Goto Top
 
CrazyaZnBoii
Member
[ * ]
because i want to use this code on my website but i need my database info to show my news unless there another way to do it

that the news code i want to use on my main page
Code:
 
<?php

#####################################################
##### IPB News Script v1.1 by Adam Stasiniewicz #####
##### Copyright © 2004 Adam Stasiniewicz        #####
##### http://www.adamscs.com                    #####
#####################################################

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.

# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.

# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.


##############################################################################################
##### Configuration section, please edit this info to meet your specific setup and needs #####
##############################################################################################

//database address
$databaseip = 'localhost';
//name of the database the stores IPB
$databasename = 'ipb';
//database username
$username = 'yourmysqlusernamegoeshere';
//database password
$password = 'password';
//the forum id of the news forum (look for the XX in index.php?showforum=XX part of the forums URL)
$forumid = '2';
//how many news post you want to show
$topicrows = '10';

##
## IPB 2.0-only Settings
##
// enter the name of the emoticons set you want to use on the homepage (look in your skin config setting, or else leave it as is)
$emoticons = 'default';
// Enter the name of the image directory that you want the script to use (look in your skin config setting, or else leave it as is)
$img_dir = '1';

##########################################################
##### Code starts here, scroll down to edit template #####
##########################################################

mysql_connect ($databaseip, $username, $password);
mysql_select_db ($databasename);
$topicq = mysql_query ("select* from ibf_topics where forum_id=".$forumid." order by start_date desc");
for ($i=0; $i <$topicrows; $i++)
{
$topicrow = mysql_fetch_array($topicq);
$titleid = $topicrow["tid"];
$topictitle = ($topicrow["title"]);
$postq = mysql_query ("SELECT * FROM `ibf_posts` where topic_id = ".$titleid." and new_topic = 1 order by post_date");
$postfetch = mysql_fetch_array($postq);
$postrow = $postfetch["post"];
$unixdate = $topicrow["start_date"];
$date = date("F jS, Y",$unixdate);
$writter = $topicrow["starter_name"];
$postrow = str_replace('<#EMO_DIR#>', $emoticons, $postrow);
$postrow = str_replace('<#IMG_DIR#>', $img_dir, $postrow);

#########################################################################################################################
##### Everything between the echo (' and '); is the template for the "repeating" section.                           #####
##### Useful variables:                                                                                             #####
##### '.$topictitle.' = The title of the news post.                                                                 #####
##### '.$postrow.' = The actual text of the news post.                                                              #####
##### '.$writter.' = The name of the person that wrote the news post.                                               #####
##### '.$date.' = The date of the news post.                                                                        #####
##### '.$titleid.' = The numeric number IPB givies to the topic.  Useful if you want to generate a "comments" link. #####
#####                                                                                                               #####
##### Below is an example, edit it to meet your needs.                                                              #####
#########################################################################################################################
echo ('  

<p>'.$topictitle.'</p>
<p>'.$postrow.'</p>
<p>'.$writter.'</p>
<p>'.$date.'</p>
<p><a href="http://forums.yourwebsite.com/index.php?showtopic='.$titleid.'">Comments?</a></p>
<p><hr></p>

');
}
?>
Offline Profile Quote Post Goto Top
 
Rory
Member Avatar
i;m a mess
[ *  *  *  *  *  *  * ]
That script is for Invision Power Board, not InvisionFree. You do not have access to the database with InvisionFree, and even if you did, it would be incompatable with that script.
Offline Profile Quote Post Goto Top
 
CrazyaZnBoii
Member
[ * ]
Is there any other way to show news on a front page?
Offline Profile Quote Post Goto Top
 
Anreem
Anreem Solutions
[ *  * ]
Yes, just turn on IF Dynamic Lite
Offline Profile Quote Post Goto Top
 
CrazyaZnBoii
Member
[ * ]
I mean showing it on a website not on the portal
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Technology Chat · Next Topic »
Add Reply