Newest Members DF Scroll Block Beta Update
| Author |
Message |
earth


Joined: Mar 01, 2006 Posts: 268
|
Post subject: Newest Members DF Scroll Block Beta Update Posted: Tue Dec 09, 2008 4:19 pm |
|
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>•</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 |
|
 |
radiogetswild


Joined: Apr 22, 2004 Posts: 685 Location: UK
|
Post subject: Re: Newest Members DF Scroll Block Beta Update Posted: Wed Dec 10, 2008 3:48 am |
|
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 |
|
 |
earth


Joined: Mar 01, 2006 Posts: 268
|
Post subject: Re: Newest Members DF Scroll Block Beta Update Posted: Wed Dec 10, 2008 3:44 pm |
|
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> <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> <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 |
|
 |
earth


Joined: Mar 01, 2006 Posts: 268
|
Post subject: Re: Newest Members DF Scroll Block Beta Update Posted: Wed Dec 10, 2008 3:47 pm |
|
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 |
|
 |
earth


Joined: Mar 01, 2006 Posts: 268
|
Post subject: Re: Newest Members DF Scroll Block Beta Update Posted: Fri May 28, 2010 6:38 pm |
|
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>•</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
_________________ dfaddons.com
earth's server specs (Server OS / Apache / MySQL / PHP / DragonflyCMS) OS/Apache/Mysql/php/9.2.X/ |
|
| Back to top |
|
 |
|
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
|

|
User Info ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Welcome Anonymous
Last CVS commits ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Languages ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Community ![Show/hide content [x]](themes/dragonfly/images/minus.png)
 Support for DragonflyCMS in a other languages:
• Deutsch
• Español
X-links ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Preview theme ![Show/hide content [x]](themes/dragonfly/images/minus.png)
Each user can view the site with a different theme.
Themes marked with a * also change the forum look.
|