[solved] Last Forum Posts block stopped working properly
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks
Author Message
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: [solved] Last Forum Posts block stopped working properly
Posted: Mon Jun 22, 2009 6:43 am
Reply with quote

My Last 10 Forum Posts block has suddenly started behaving strangely. On themes with larger text it only displays the last two posts then resets and with smaller font themes it manages three then resets. It does scroll those posts ok, resetting at the end of the post.

Any ideas?


rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
BrokenCrust
500+ Posts Club


Joined: Sep 06, 2004
Posts: 503

PostPost subject: Re: Last Forum Posts block stopped working properly
Posted: Mon Jun 22, 2009 7:36 am
Reply with quote

It seems to be working for me - the default theme / not logged in / with FF3 - it shows 10 posts. Are you viewing with IE8 ?

Marquee is best avoid IMO since it isn't supported that well in all browsers including IE8 - plus it offers a cheesy ninety's user experience.


BrokenCrust's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.17/5.0.91/5.2.16/9.2.1
Back to top
View user's profile
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: Last Forum Posts block stopped working properly
Posted: Mon Jun 22, 2009 7:55 am
Reply with quote

Ah it is IE8, of course that's what's changed. Do I just have to grin and bear it for IE8 then? Interestingly the Upcoming Events block from CPGNuCalendar works fine...

rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1


Last edited by rosbif on Thu Jun 25, 2009 8:18 am; edited 1 time in total
Back to top
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: Last Forum Posts block stopped working properly
Posted: Mon Jun 22, 2009 10:17 am
Reply with quote

Oddly enough on another PC using IE8 it works fine...

rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: Last Forum Posts block stopped working properly
Posted: Thu Jun 25, 2009 8:18 am
Reply with quote

Anyone?

rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
Phoenix
Site Admin


Joined: Apr 19, 2004
Posts: 8729
Location: Netizen

PostPost subject: Re: Last Forum Posts block stopped working properly
Posted: Thu Jun 25, 2009 9:29 am
Reply with quote

Enclose the scrolling content within a <div> e.g.
PHP:
<?php
$content = '<div style="text-align:center"><b>'.sprintf(_LASTMSGS, 10).'</b></div><marquee align="center" direction="up" scrollamount="2" scrolldelay="70" onmouseover=\'this.stop()\' onmouseout=\'this.start()\'><br /><div>';
while (list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id, $username, $user_id, $poster_id, $post_time) = $db->sql_fetchrow($result)) {
$post_time = formatDateTime($post_time, '%b %d, %Y '._AT.' %T');
$topic_title = check_words($topic_title);
$content .= '<img src="'.$iconpath.'/icon_mini_message.gif" alt="" />
<a href="'
.getlink('Forums&amp;file=viewtopic&amp;p='.$topic_last_post_id.'#'.$topic_last_post_id).'"><strong>'.$topic_title.'</strong></a>
<i>'
.sprintf(_LASTPOSTBY, '<a href="'.getlink('Your_Account&amp;profile='.$username).'">'.$username.'</a>', '<a href="'.getlink('Forums&amp;file=viewforum&amp;f='.$forum_id).'">'.$forum_name.'</a>', $post_time).'</i><br /><br />';
}
$content .= '</div></marquee>';
Note the <div> after <marquee ...> and </div> before </marquee>.

The reason that the CPGNuCal block appears to work is that the scrolled content is within a table.


Phoenix's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Back to top
View user's profile Visit poster's website
rosbif
500+ Posts Club


Joined: Jan 13, 2005
Posts: 571
Location: Paris, France

PostPost subject: Re: [solved] Last Forum Posts block stopped working properly
Posted: Thu Jun 25, 2009 11:17 am
Reply with quote

Fantastic, simple as that. Thank you!

rosbif's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Linux/2.2.11/5.0.77/5.2.8/9.2.1
Back to top
View user's profile Visit poster's website
Cybermonk
Nice poster


Joined: Sep 29, 2004
Posts: 71
Location: Netherlands, Heerlen

PostPost subject: Re: [solved] Last Forum Posts block stopped working properly
Posted: Sun Nov 01, 2009 1:03 pm
Reply with quote

Thank you very much.. this fixed my problem that users with IE8 have to use compatibility mode to display this block properly Smile
_________________
Current site:
EQdkp-Plus 0.6.3.5, PHPBB3 3.0.6, PHP 5.2.9, MySQL 5.0.84 , Apache 2
Visit us: www.lessqqmorepewpew.eu

Cybermonk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Debian / Apache 2 / MySQL 5.0.84 / PHP 5.2.9 / Dragonfly CMS 9.2.1.0
Back to top
View user's profile Visit poster's website
Cybermonk
Nice poster


Joined: Sep 29, 2004
Posts: 71
Location: Netherlands, Heerlen

PostPost subject: Re: [solved] Last Forum Posts block stopped working properly
Posted: Wed Nov 04, 2009 8:19 am
Reply with quote

Help Sad

I upgraded my forums from CPGBB to ForumsPro 2.0.3 and now i have exactly the same problem with the block-ForumsPro-scroll-Last_10_Posts

I opened the file in editor.. but i have no idea where and what to change in this block to fix the scrolling in IE8.

Here is the block:

Code:
<?php
/*
  +-------------------------------------------------------------------+
  | CPG Dragonfly™ CMS                                                |
  | Copyright © 2004 - 2005 by CPG-Nuke Dev Team                      |
  | http://www.dragonflycms.com                                       |
  | Dragonfly is released under the terms and conditions of the GNU   |
  | GPL version 2 or any later version                                |
  +-------------------------------------------------------------------+
  | Myndworx Asylum Software                                          |
  | This software is developed by the programming crew at the Myndworx|
  | Asylum for the Programmatically Insane.                           |
  | Copyright © 2005, 2006 by Myndworx Asylum and the original author |
  | listed below.                                                     |
  +-------------------------------------------------------------------+
  | block-ForumsPro                                                   |
  | Provides a block to display recent posts in your Froums.          |
  +-------------------------------------------------------------------+
  | Last modification notes:                                          |
  | $Source: /cvsroot/mwa/MwA_Software/Modules/ForumsPro/html/blocks/block-ForumsPro.php,v $                      |
  | $Revision: 177 $                                                  |
  | $Author: jday29 $                                             |
  | $Date: 2006-05-02 23:11:11 -0500 (Tue, 02 May 2006) $                                         |
  +-------------------------------------------------------------------+
*/
if (!defined('CPG_NUKE')) {
	exit;
}

# Get the name of the module from the filename
# Filename should be in the format:
#   block-$module_name[-center][-scroll][-extra_info].php
# 
# Where:
#   $module_name is the name of the module
#   -center is added if this is a center block
#   -scroll is added if this is a scrolling block
#   -extra_info is added if there is extra information for this block (ie. Last 5 Topics, Last 5 Posts, Hottest 5 Topics, etc)
$block_file_info = explode('-', substr(basename(__FILE__), 6, (basename(__FILE__) - 4)));
$mod_dirname = $block_file_info[0];

global $db, $prefix, $sitename, $cpgtpl, $user_prefix, $CPG_SESS, $currentlang;
global $forumspro_base, $forums_list_all, $forums_list, $forumspro_prefix, $board_config;

include(BASEDIR.'modules/'.$mod_dirname.'/common_setup.php');

# Make sure the ForumsPro module is active
if (!forumspro_check_installation(true) || !is_active($forumspro_base)) {
	$content = 'ERROR';
	return trigger_error(sprintf(_FPRO_FORUMSPROISINACTIVE, $forumspro_base), E_USER_WARNING);
}
forumspro_setup();

# Get the list of forums the user is allowed to read (auth_read)
$content = '';
$forums_to_query = forumspro_get_auth_forums_list(0, 0, 'auth_read');

if (0 == count($forums_to_query)) {
	return;
}

# Query the latest topics from the forums the user has privileges to read (auth_read)
$result_topics = $db->sql_query('SELECT t.*, f.forum_id, f.forum_name, u.username, u.user_id, u2.username as user2, u2.user_id as id2, p.post_username, p2.post_username AS post_username2, p2.post_time, pt.post_subject'.($board_config['topic_post_text_enable'] ? ', pt.post_text AS last_post_text, pt2.post_text AS first_post_text' : '').' FROM '.$forumspro_prefix.'topics t, '.$forumspro_prefix.'forums f, '.$user_prefix.'_users u, '.$forumspro_prefix.'posts p, '.$forumspro_prefix.'posts p2, '.$user_prefix.'_users u2, '.$forumspro_prefix.'posts_text pt'.($board_config['topic_post_text_enable'] ? ', '.$forumspro_prefix.'posts_text pt2' : '').' WHERE t.forum_id IN ('.implode(', ', $forums_to_query).') AND t.topic_poster = u.user_id AND f.forum_id = t.forum_id AND p.post_id = t.topic_first_post_id AND p2.post_id = t.topic_last_post_id AND u2.user_id = p2.poster_id AND pt.post_id = t.topic_last_post_id'.($board_config['topic_post_text_enable'] ? ' AND pt2.post_id = t.topic_first_post_id' : '').' ORDER BY t.topic_last_post_id DESC LIMIT 0, 10');
$topics = array();
while($row_topic = $db->sql_fetchrow($result_topics, SQL_ASSOC)) {
	$topics[] = $row_topic;
}
$db->sql_freeresult($result_topics);

if (1 > count($topics)) {
	$content = 'ERROR';
	return trigger_error(_FPRO_THEREARENOPOSTS, E_USER_NOTICE);
} else {

	# Add the topics to the template
	require_once(BASEDIR.'includes/ForumsPro/display_topics.php');
	forumspro_template_add_topics($topics, 0, '', false, $forumspro_base);
	$theme_path = forumspro_template_add_theme_path();
	$cpgtpl->assign_vars(array(
		'L_LAST_POST_BY' => _FPRO_LASTPOSTBY,
		'L_REPLIES' => _FPRO_REPLIES,
		'L_VIEWS' => _FPRO_VIEWS,
		'L_IN_FORUM' => _FPRO_INFORUM,
		'L_ON' => _FPRO_ON,
		)
	);
	
	# Add the content to the block
	ob_start();
	$cpgtpl->set_filenames(array('block' => 'blocks/'.str_replace('.php', '.html', basename(__FILE__))));
	$cpgtpl->display('block', false);
	$content = ob_get_clean();
	$cpgtpl->unset_block('topic');
}

Could someone please tell me what i have to change in this block? I cant find marquee so i have no idea what i have to change.


Cybermonk's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
Debian / Apache 2 / MySQL 5.0.84 / PHP 5.2.9 / Dragonfly CMS 9.2.1.0
Back to top
View user's profile Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks All times are GMT
Page 1 of 1


Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

stopsoftwarepatents.eu petition banner
User Info [x]

Welcome Anonymous

Nickname
Password
(Register)

Last CVS commits [x]

Languages [x]

Community [x]

Support for DragonflyCMS in a other languages:

Deutsch
Español

X-links [x]
UltraEdit Browse Happy logo Firefox MySQL PostgreSQL Valid CSS! Valid XHTML 1.0! Unicode Encoded Badge NukeBiz Resources Raven DragonflyCMS Dedicated Now InsideSupport Lampe Berger

Preview theme [x]
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.


You are seeing squares or questionmarks on this page?

All content of this website is copyrighted by the Creative Commons NC-SA
The logos and trademarks used on this site are the property of their respective owners
We are not responsible for comments posted by our users, as they are the property of the poster.
Our server runs on a P3 1.2GHz with 512MB RAM with no accelerators
Support GoPHP5.org
This page generated in 2.3944 seconds with 16 DB Queries in 0.3528 seconds
Memory Usage: 2.96 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy