Newest Members DF Scroll Block Beta Update
Post new topic   Reply to topic   Printer Friendly Page     Forum IndexAdd-Ons & Blocks
Author Message
earth
Heavy poster


Joined: Mar 01, 2006
Posts: 268

PostPost subject: Newest Members DF Scroll Block Beta Update
Posted: Tue Dec 09, 2008 4:19 pm
Reply with quote

I looked and searched for the thread I asked for help on, where nano suggested a language pack need to be used to get the time to format properly and it was set to the main language file in this block to function and you can change to values 1-4 I think for the timestamp format of your choice!

Here is the code and attached zip file if preferred and I did modify the credits some, as HadiOO was and still is given credit, however I did post myself as the author of this hacked version if that is ok and if Phoenix, nano, djmaze and the rest of us make sure it is ready for the download section, that would be great, as I had a version with avatas as the icon instead that I am still working on, that will post up if and when completed.

PHP:
<?php
/************************************************************************
* $Newest Members Block
* $Version: 1.0
* $Author: earth
* $Date: 2008/12/08
* $Fixed For DF 9.X by earth
* $Fixed for cpgnuke By Hadi00 ahlaalam.com
ahlaalam00@hotmail.com
* DragonflyCMS http://www.dragonflycms.com
* Credits: Francisco Burzi, Hadi00 , DjMaze, Phoenix, Nano C, DjDevon, and the Dragonfly Community!
* *
*
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. *
************************************************************************/
if (!
defined('CPG_NUKE')) { exit; }

if (!
is_active('Your_Account')) {
$content = 'ERROR';
return trigger_error('Your_Account module is inactive', E_USER_WARNING);
} else {

get_lang('main');

global $db, $prefix, $userinfo, $MAIN_CFG;
$memb = 20;
$result = $db->sql_query("SELECT username, theme, user_avatar, user_from, user_website, user_regdate
FROM "
.$prefix."_users
ORDER BY user_id
DESC lIMIT $memb"
);

if ($result) {
while (list($username, $theme, $user_avatar, $user_from, $user_website, $user_regdate) = $db->sql_fetchrow($result)) {

//Here we added continue to prevent the "Anonymous" from bieng viewd; Hadi00
if($username=="Anonymous")continue;
$content .='<center><b>&#8226;</b><a title="'.$username.'" href="'.getlink('Your_Account&profile='.$username).'">'.$username.'</a><br />';
$content .='<center><a title="'.formatDateTime($user_regdate, _DATESTRING3).'" href="'.getlink('Your_Account&profile='.$username).'">'.formatDateTime($user_regdate, _DATESTRING3).'</a><br /><br>';
}
$db->sql_freeresult($result);
}
$content .= "</td></tr>";
$content .= "</table>";
}


earth's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
OS/Apache/Mysql/php/9.2.X/
Back to top
View user's profile Visit poster's website
radiogetswild
500+ Posts Club


Joined: Apr 22, 2004
Posts: 685
Location: UK

PostPost subject: Re: Newest Members DF Scroll Block Beta Update
Posted: Wed Dec 10, 2008 3:48 am
Reply with quote

Sounds great I will await for the download

many thanks and have a great christmas

Tim


radiogetswild's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
MySQL Version 5.0.45 PHP Version 5.2.6 apache is 1.3.41 Dragonfly 9.2.1 Windows Vista
Back to top
View user's profile Send e-mail Visit poster's website Yahoo Messenger
earth
Heavy poster


Joined: Mar 01, 2006
Posts: 268

PostPost subject: Re: Newest Members DF Scroll Block Beta Update
Posted: Wed Dec 10, 2008 3:44 pm
Reply with quote

thanks tim, the code above was modified some to scroll, as the 20 members non scrolling was a bit to much

so here is the scrolling block code that is preferred imho and the download is attached!

PHP:
<?php
/************************************************************************
* $Revision: 1.0 $
* $Author: Earth $
* $Date: 2007/10/02 12:37:50 $
* *
* 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. *
************************************************************************/
if (!defined('CPG_NUKE')) { exit; }

if (!
is_active('Your_Account')) {
$content = 'ERROR';
return trigger_error('Your_Account module is inactive', E_USER_WARNING);
} else {

get_lang('main');

$content .= "<A name= \"scrollingCode\"></A>
<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"100\" scrollamount= \"2\" scrolldelay= \"90\" onmouseover='this.stop()' onmouseout='this.start()'>
<table cellpadding=\"0\" cellspacing=\"0\">"
;
$content .= "<tr valign=\"top\"><td>";
$content .= "";
global $db, $prefix, $userinfo;
$memb = 20;
$result = $db->sql_query("SELECT username, theme, user_avatar, user_from, user_website, user_regdate
FROM "
.$prefix."_users
ORDER BY user_id
DESC lIMIT $memb"
);

if ($result) {
while (list($username, $theme, $user_avatar, $user_from, $user_website, $user_regdate) = $db->sql_fetchrow($result)) {
if(strlen($url2) > 25) {
$url2 = substr($user_website,0,25);
$url2 .= "..";
}
// remowe first 7 characters-> h t t p : //
$url2 = substr($url2, +7);
//Here we added continue to prevent the "Anonymous" from bieng viewd; Hadi00
if($username=="Anonymous")continue;
$DataMembers .="<font class=\"content\"><img src=\"images/blocks/ur-new5.gif\" width=17 height=14 border=0>&nbsp;<A HREF=\"$index?name=Your_Account&profile=$username\"><b>$username</b></a><BR></font>";
$DataMembers .='<a title="'.formatDateTime($userinfo['user_regdate'], _DATESTRING2).'" href="'.getlink('Your_Account&profile='.$username).'">'.formatDateTime($userinfo['user_regdate'], _DATESTRING2).'</a><br />';
}
$db->sql_freeresult($result);
$DataMembers .="<font class=\"content\"><img src=\"images/blocks/ur-new5.gif\" width=17 height=14 border=0>&nbsp;<a href=\"$index?name=Your_Account&profile=$username)\">$user_regdate</a><BR></font>";
}
$content .= "$DataMembers";
$content .= "</td></tr>";
$content .= "</table>";
}


earth's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
OS/Apache/Mysql/php/9.2.X/
Back to top
View user's profile Visit poster's website
earth
Heavy poster


Joined: Mar 01, 2006
Posts: 268

PostPost subject: Re: Newest Members DF Scroll Block Beta Update
Posted: Wed Dec 10, 2008 3:47 pm
Reply with quote

just noticed that is less modified and is more of the code that HadiOO wrote, as it works, however there will be a few warnings, like content undefined for $datamembers, so will try and get a more revised version up later, unless someone else does b4 now and then!
_________________
dfaddons.com

earth's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
OS/Apache/Mysql/php/9.2.X/
Back to top
View user's profile Visit poster's website
earth
Heavy poster


Joined: Mar 01, 2006
Posts: 268

PostPost subject: Re: Newest Members DF Scroll Block Beta Update
Posted: Fri May 28, 2010 6:38 pm
Reply with quote

Code:
<?php
/************************************************************************
* $Newest Members Block
* $Version: 1.0 
* $Author:  earth
* $Date: 2008/12/08 
* $Fixed For DF 9.X by earth
 * $Fixed for cpgnuke By Hadi00 http://ahlaalam.com	ahlaalam00@hotmail.com
 * DragonflyCMS  http://www.dragonflycms.com
 * Credits: Francisco Burzi, Hadi00 , DjMaze, Phoenix, Nano C, DjDevon,  and the Dragonfly Community!
*                                                                       *
* 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.        *
************************************************************************/
if (!defined('CPG_NUKE')) { exit; }

if (!is_active('Your_Account')) {
	$content = 'ERROR';
	return trigger_error('Your_Account module is inactive', E_USER_WARNING);
} else {

    get_lang('main');

	global $db, $prefix, $userinfo, $MAIN_CFG;
    $memb = 20;
	$result = $db->sql_query("SELECT username, theme, user_avatar, user_from, user_website, user_regdate 
	FROM ".$prefix."_users 
	ORDER BY user_id 
	DESC lIMIT $memb");

	if ($result) {
	    while (list($username, $theme, $user_avatar, $user_from, $user_website, $user_regdate) = $db->sql_fetchrow($result)) {

//Here we added continue to prevent the "Anonymous" from bieng viewd; Hadi00
if($username=="Anonymous")continue;
    $content .='<center><b>&#8226;</b><a title="'.$username.'" href="'.getlink('Your_Account&profile='.$username).'">'.$username.'</a><br />';
	$content .='<center><a title="'.formatDateTime($user_regdate, _DATESTRING3).'" href="'.getlink('Your_Account&profile='.$username).'">'.formatDateTime($user_regdate, _DATESTRING3).'</a><br /><br>';
	    }
		$db->sql_freeresult($result);
}
$content .= "";
$content .= "";
}

?>

no Scroll Confused

_________________
dfaddons.com

earth's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS)
OS/Apache/Mysql/php/9.2.X/
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.2057 seconds with 19 DB Queries in 0.0349 seconds
Memory Usage: 2.93 MB
Interactive software released under GNU GPL, Code Credits, Privacy Policy