NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page Invision Help!

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search
2 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 08-05-2005, 08:38 AM THREAD STARTER               #1 (permalink)
D@Z
NamePros Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 165
D@Z is on a distinguished road
 



Invision Help!


Hey folks,

I've got a problem with Invision Power Boards (v1.2). What's happening is, the tags [doHTML] & [/doHTML] allow HTML to be posted in threads, and when I do that in the thread, everything works fine.

However, because I am using a news mod to interage threads from a certain forum onto my site's home page. The [doHTML] tags then no longer work on the homepage.

Here is all the code for the news mod;
PHP 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 '{username}_ivbd1';
//database username
$username '{username}';
//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 '20';
//how many news post you want to show
$topicrows '5';

##
## 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++)
{
if ( 
$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. #####
????: NamePros.com http://www.namepros.com/programming/112846-invision-help.html
#####                                                                                                               #####
##### Below is an example, edit it to meet your needs.                                                              #####
#########################################################################################################################
echo ('  

<table width="390" align="center" cellpadding="0" cellspacing="0" border="0">
<tr>
<td style="border-right: #a0a0a0 1px solid; padding-left: 3px; background-color: #4f4f4f; text-align: left; vertical-align: middle; width: 300px; height: 20px">
&raquo; <font style="font-weight: bold; text-transform: uppercase; letter-spacing: 1px">'
.$topictitle.'</font></td>
<td style="background-color: #4f4f4f; text-align: right; vertical-align: middle; width: 90px; height: 20px">
<a href="http://www.korntv.co.uk/boards/index.php?showtopic='
.$titleid.'">Comments('.$topicrow["posts"].')</a></td>
</tr>
<tr>
<td style="padding: 5px; text-align: left; vertical-align: top" colspan="2">'
.$postrow.'</td>
</tr>
<tr>
<td style="padding-left: 3px; background-color: #4f4f4f; text-align: left; vertical-align: middle; width: 390px; height: 20px" colspan="2"><i>Posted by '
.$writter.', on '.$date.'</i></td>
????: NamePros.com http://www.namepros.com/showthread.php?t=112846
</tr>
</table><br /><br /><br />

'
);
}
}
?>
If would anyone be as kind to look relively quick I would be so grateful as I dont fancy having a test news article online all day.

Thanks so much for looking, and I hope someone can help.
Last edited by D@Z; 08-05-2005 at 09:30 AM.
D@Z is offline  
Old 08-05-2005, 09:19 AM   #2 (permalink)
Account Suspended
 
abdulmueid's Avatar
Join Date: Jun 2005
Location: Mozambique
Posts: 606
abdulmueid has a spectacular aura aboutabdulmueid has a spectacular aura about
 



This mod is for IPB 2.
abdulmueid is offline  
Old 08-05-2005, 09:23 AM THREAD STARTER               #3 (permalink)
D@Z
NamePros Member
Join Date: Jun 2004
Location: United Kingdom
Posts: 165
D@Z is on a distinguished road
 



It said on the website I downloaded it from that yes, the mod was for mainly IPB v2.0, but, it works also with others. It works fine on my version apart from the doHTML tags.
D@Z is offline  
Old 08-05-2005, 09:46 AM   #4 (permalink)
Account Suspended
 
abdulmueid's Avatar
Join Date: Jun 2005
Location: Mozambique
Posts: 606
abdulmueid has a spectacular aura aboutabdulmueid has a spectacular aura about
 



Is this the only piece of code for the script? because this bit has nothing to do with those tags. Maybe some other editing to the files have caused the problem.
abdulmueid is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Invision Power Board aal814 Web Design Discussion 3 12-04-2004 06:15 PM
invision board skins Crusader The Break Room 7 06-17-2004 11:36 AM
Skinning Services (INVISION) ParKW Web Development Wanted 2 03-10-2004 07:39 AM
Mod for invision board - to have points zoya19 Website Development 3 11-27-2003 07:43 PM

 
All times are GMT -7. The time now is 12:10 PM.

Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger