[ABD] News Mod

Any abandoned MODs will be moved to this forum.

WARNING: MODs in this forum are not currently being supported or maintained by the original MOD author. Proceed at your own risk.
Forum rules
IMPORTANT: MOD Development Forum rules

WARNING: MODs in this forum are not currently being supported nor updated by the original MOD author. Proceed at your own risk.
User avatar
OxRod
Registered User
Posts: 28
Joined: Tue Aug 12, 2003 9:07 pm

Re: [RC] News Mod

Post by OxRod » Thu Jul 10, 2008 3:12 am

Mod works great, but even though I set it to "true" Avatars do not show, No erro, they just do not show. Any idea why?

Mathijs1988
Registered User
Posts: 112
Joined: Wed Aug 08, 2007 9:54 am

Re: [RC] News Mod

Post by Mathijs1988 » Thu Jul 10, 2008 10:36 am

same problem here.

KenjiE20
Registered User
Posts: 31
Joined: Mon Feb 03, 2003 9:27 pm
Location: Washington, UK
Contact:

Re: [RC] News Mod

Post by KenjiE20 » Thu Jul 10, 2008 10:56 am

For the avatar bug;

Find

Code: Select all

$avatar = '<img src="/'.$forumpath.'/download.php?avatar='.$useridrow->user_avatar.'" alt="" />';
replace with

Code: Select all

$avatar = '<img src="./'.$forumpath.'/download/file.php?avatar='.$useridrow->user_avatar.'" alt="" />';
There is also a bug with the subject titles that don't always use the correct link to fix this;

Find

Code: Select all

//load + use template
place BEFORE

Code: Select all

//$current subject bug
$current_subject = '<a href="./'.$forumpath.'/viewtopic.php?f='.$current_forum.'&t='.$current_topic.'">'.$current_subject.'</a>';
I also noticed some of the other links don't always work with unusual forum locations. To fix this you need to find

Code: Select all

$replylink
$replyURL
$viewURL
$viewlink
$posterlink
$message = substr($message,0,$charlimit) . "...<a href=\"/" . $forumpath . "/viewtopic.php?f=".$current_forum."&t=" . $current_topic . "\">(read more)</a>";
and be sure to check that any

Code: Select all

<a href=\"/".$forumpath."
or
<a href="/'.$forumpath.'
read

Code: Select all

<a href=\"./".$forumpath."
or
<a href="./'.$forumpath.'
(note the dot before the leading '/') This aught to fix it

User avatar
OxRod
Registered User
Posts: 28
Joined: Tue Aug 12, 2003 9:07 pm

Re: [RC] News Mod

Post by OxRod » Thu Jul 10, 2008 4:57 pm

Wow that worked great, Thank you for your time on this issue.

Now, if I may ask more. How would I change the link colors so that I can have them more like my Forum template? I had made some changes to colors, but when I added your code fixes above I went back to the ugly Blue links, with Purple already visited links.

KenjiE20
Registered User
Posts: 31
Joined: Mon Feb 03, 2003 9:27 pm
Location: Washington, UK
Contact:

Re: [RC] News Mod

Post by KenjiE20 » Fri Jul 11, 2008 12:48 am

OxRod wrote:Wow that worked great, Thank you for your time on this issue.

Now, if I may ask more. How would I change the link colors so that I can have them more like my Forum template? I had made some changes to colors, but when I added your code fixes above I went back to the ugly Blue links, with Purple already visited links.
These questions I can deal with :mrgreen:
Add this

Code: Select all

<link rel="stylesheet" href="./<path to forum>/styles/<your theme dir here>/theme/stylesheet.css" type="text/css" />
into the <head></head> part of the file that uses

Code: Select all

<?php
include ('mod.php');
?>
and it should all automagically use the styles your forum does.
You may still have to edit the file further to match the layout, but that should be fairly straight forward.

Ares545
Registered User
Posts: 14
Joined: Thu Apr 24, 2008 6:49 pm

Re: [RC] News Mod

Post by Ares545 » Sun Jul 13, 2008 4:18 am

the .zip file is corrupt -_-

I've tried 8 times. It's definetely not me.

nvm got it

Am I supposed to stick the files in my root directionry or the phpbb3 directory?

I currently have the config.php, mod.php, template.html in the root and when I go into template.html (with the added php include code) I get this :

Code: Select all

Warning: mysql_connect(): Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) in /home/www/arc.mygamesonline.org/config.php on line 46
Could not connect to DB server!

Ares545
Registered User
Posts: 14
Joined: Thu Apr 24, 2008 6:49 pm

Re: [RC] News Mod

Post by Ares545 » Sun Jul 13, 2008 7:47 am

Yay got it working near perfectly. One problem.

At the end of my news list it always has a blank news page where it just displays the template but with no information.

preview

arc.mygamesonline.org

Ares545
Registered User
Posts: 14
Joined: Thu Apr 24, 2008 6:49 pm

Re: [RC] News Mod

Post by Ares545 » Sun Jul 13, 2008 10:01 pm

bump

KenjiE20
Registered User
Posts: 31
Joined: Mon Feb 03, 2003 9:27 pm
Location: Washington, UK
Contact:

Re: [RC] News Mod

Post by KenjiE20 » Thu Jul 17, 2008 11:03 am

Ares545 wrote:Yay got it working near perfectly. One problem.

At the end of my news list it always has a blank news page where it just displays the template but with no information.

preview

arc.mygamesonline.org
I took a quick look, but I can't really tell where the problem is without seeing the
index.php / mod.php / template.html
files. If you havn't changed anything in the mod.php then there shouldn't be a problem there.
Could you post the contents of the files so I could take a look?

ecwpa
Registered User
Posts: 107
Joined: Thu Sep 25, 2003 2:13 am
Contact:

Re: [RC] News Mod

Post by ecwpa » Thu Jul 17, 2008 4:04 pm

hey guys, i managed to fix the problem with the session

if you have your main page in a php file you can do this:

find this in mod.php

Code: Select all

define('IN_PHPBB', true);
$phpbb_root_path = '../forums/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include_once($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup(); 
remove it

now in the top of your main page (mine is index.php) paste this

Code: Select all

<?php
define('IN_PHPBB', true);
$phpbb_root_path = '../forums/';  // you may change this to your relative forum root path
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include_once($phpbb_root_path . 'common.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
?> 
now save both files and cross your fingers :D


note:
if you remember, the main page is actually an html page but it has to be saved as .php or it wont going to work, so after that code it must be the begining of your html page, stating with <html><head>...etc

ps. didn't notice the KenjiE20 edits until now that i need them, great job!
carefull, not english speaker native here

KenjiE20
Registered User
Posts: 31
Joined: Mon Feb 03, 2003 9:27 pm
Location: Washington, UK
Contact:

Re: [RC] News Mod

Post by KenjiE20 » Sun Aug 03, 2008 3:43 pm

I just stumbled accross a glitch with the avatar system, it only worked for uplaoded avatars;
so where

Code: Select all

$avatar = '<img src="./'.$forumpath.'/download/file.php?avatar='.$useridrow->user_avatar.'" alt="" />';
is in the mod.php file, you will need to replace it with

Code: Select all

 //Avatar fix
if ($useridrow->user_avatar_type == 0)
{
$avatar = '';
}
elseif ($useridrow->user_avatar_type == 1)
{
$avatar = '<img src="./'.$forumpath.'/download/file.php?avatar='.$useridrow->user_avatar.'" alt="" />';
}
elseif ($useridrow->user_avatar_type == 2)
{
$avatar = '<img src="'.$useridrow->user_avatar.'" alt="" />';
}
elseif ($useridrow->user_avatar_type == 3)
{
$avatar = '<img src="./'.$forumpath.'/'.$config['avatar_gallery_path'].'/'.$useridrow->user_avatar.'" alt="" />';
}
else
{
$avatar = '';
}

Daniel Exe
Registered User
Posts: 573
Joined: Wed Sep 14, 2005 7:59 pm
Location: Canada
Contact:

Re: [RC] News Mod

Post by Daniel Exe » Sun Aug 10, 2008 2:50 pm

Hm..download link isn't working. Can anyone provide a download?
My phpBB3 styles: 610nm, Cerulean, CoDFaction, DarkFantasy, GuildWarsAlliance, twilightBB
http://www.gamexe.net

MrC
Registered User
Posts: 857
Joined: Mon Jun 30, 2003 4:11 pm
Location: The Netherlands
Name: Ivo
Contact:

Re: [RC] News Mod

Post by MrC » Sun Aug 10, 2008 7:05 pm

Daniel Exe wrote:Hm..download link isn't working. Can anyone provide a download?
Just tested the dl link, but for me it works.

Nicole86
Registered User
Posts: 25
Joined: Wed Jun 18, 2008 3:12 pm
Location: AT

Re: [RC] News Mod

Post by Nicole86 » Sun Aug 10, 2008 7:21 pm

I can download it now... but yesterday I had the same problem like Daniel Exe!

User avatar
DoctorWombat
Registered User
Posts: 21
Joined: Mon Mar 26, 2007 9:23 pm
Location: Vancouver, Canada
Contact:

Re: [RC] News Mod

Post by DoctorWombat » Wed Aug 20, 2008 2:37 pm

Updated version for the custom BBcode fix... rules. : )

One thing I wanted to point out, though -- when I upload an image and then place it inline, it doesn't show up. : (

Locked

Return to “[3.0.x] Abandoned MODs”