You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Florin C B. <ory...@us...> - 2011-03-03 14:34:54
|
Update of /cvsroot/mxbb/mx_smartor/phpbb3/root/adm/style In directory vz-cvs-4.sog:/tmp/cvs-serv29948/style Log Message: Directory /cvsroot/mxbb/mx_smartor/phpbb3/root/adm/style added to the repository |
|
From: Florin C B. <ory...@us...> - 2011-03-03 14:34:45
|
Update of /cvsroot/mxbb/mx_smartor/phpbb3/root/adm In directory vz-cvs-4.sog:/tmp/cvs-serv29907/adm Log Message: Directory /cvsroot/mxbb/mx_smartor/phpbb3/root/adm added to the repository |
|
From: Florin C B. <ory...@us...> - 2011-03-03 14:34:36
|
Update of /cvsroot/mxbb/mx_smartor/phpbb3/root In directory vz-cvs-4.sog:/tmp/cvs-serv29876/root Log Message: Directory /cvsroot/mxbb/mx_smartor/phpbb3/root added to the repository |
|
From: Florin C B. <ory...@us...> - 2011-03-03 14:33:30
|
Update of /cvsroot/mxbb/mx_smartor/phpbb3 In directory vz-cvs-4.sog:/tmp/cvs-serv28457/phpbb3 Log Message: Directory /cvsroot/mxbb/mx_smartor/phpbb3 added to the repository |
|
From: Florin C B. <ory...@us...> - 2011-03-03 14:28:45
|
Update of /cvsroot/mxbb/mx_smartor/admin
In directory vz-cvs-4.sog:/tmp/cvs-serv24509/admin
Modified Files:
admin_album_otf.php
Log Message:
some updated for PHP 5.3.0 decapritated functions
Index: admin_album_otf.php
===================================================================
RCS file: /cvsroot/mxbb/mx_smartor/admin/admin_album_otf.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** admin_album_otf.php 27 Mar 2008 14:30:55 -0000 1.4
--- admin_album_otf.php 3 Mar 2011 14:28:40 -0000 1.5
***************
*** 297,301 ****
$s_colspan = 0;
! $pic_cat_reg = ereg_replace("[^A-Za-z0-9]", "_", $pic_cat);
$js_include = '';
$js_images_list = '';
--- 297,301 ----
$s_colspan = 0;
! $pic_cat_reg = preg_replace("/[^A-Za-z0-9]/", "_", $pic_cat);
$js_include = '';
$js_images_list = '';
|
|
From: Florin C B. <ory...@us...> - 2011-03-03 14:28:44
|
Update of /cvsroot/mxbb/mx_smartor
In directory vz-cvs-4.sog:/tmp/cvs-serv24509
Modified Files:
album.php db_install.php db_uninstall.php db_upgrade.php
Log Message:
some updated for PHP 5.3.0 decapritated functions
Index: album.php
===================================================================
RCS file: /cvsroot/mxbb/mx_smartor/album.php,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** album.php 8 Jan 2009 20:43:41 -0000 1.27
--- album.php 3 Mar 2011 14:28:40 -0000 1.28
***************
*** 642,710 ****
album_page_header();
! $template->set_filenames(array(
! 'body' => 'album_index_body.tpl')
! );
!
! $cols = ($album_sp_config['img_cols'] == 0 ? 4 : $album_sp_config['img_cols']);
! $cols_width = (100 / $cols) . '%';
- // Last Comments
- if ($album_config['show_last_comments'] == 1)
- {
- album_build_last_comments_info($allowed_cat);
- }
! // Recent Public Pics
! if ($album_sp_config['disp_late'] == 1)
! {
! album_build_recent_pics($allowed_cat);
! }
! // Highest Rated Pics
! if ($album_sp_config['disp_high'] == 1)
! {
! album_build_highest_rated_pics($allowed_cat);
! }
! // Most Viewed Pics
! if ($album_sp_config['disp_mostv'] == 1)
! {
! album_build_most_viewed_pics($allowed_cat);
! }
! //Random Pics
! if ($album_sp_config['disp_rand'] == 1)
! {
! album_build_random_pics($allowed_cat);
! }
! $otf_link = ( $userdata['user_level'] == ADMIN ) ? mx_append_sid(this_smartor_mxurl("smartor_mode=album_otf" . '&sid=' . $userdata['session_id'])) : mx_append_sid(this_smartor_mxurl("smartor_mode=album_otf"));
! $template->assign_vars(array(
! 'ALBUM_NAV' => $album_nav_cat_desc,
! 'S_COLS' => $cols,
! 'S_COL_WIDTH' => $cols_width,
! 'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '',
! 'L_RAND_PICS' => $lang['Random_Public_Pics'],
! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Pics'],
! 'L_HI_RATINGS' => $lang['Toprated_Public_Pics'],
! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Pics'],
! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'],
! 'L_MOST_VIEWED' => $lang['Most_Public_Pics'],
! 'L_NO_PICS' => $lang['No_Pics'],
! 'L_PIC_TITLE' => $lang['Pic_Image'],
! 'L_PIC_ID' => $lang['Pic_ID'],
! 'L_VIEW' => $lang['View'],
! 'L_POSTER' => $lang['Pic_Poster'],
! 'L_POSTED' => $lang['Posted'],
! 'L_ALBUM_ALLPICS' => $lang['All_Picture_List_Of_User'],
! 'L_ALBUM_OTF' => $lang['Pic_Gallery'],
! 'U_ALBUM_ALLPICS' => mx_append_sid(this_smartor_mxurl("smartor_mode=album_allpics")),
! 'OTF_LINK' => $otf_link,
! 'U_ALBUM_OTF' => $otf_link,
! )
! );
// it's a personal gallery, and in the root folder
--- 642,708 ----
album_page_header();
! $template->set_filenames(array(
! 'body' => 'album_index_body.tpl')
! );
+ $cols = ($album_sp_config['img_cols'] == 0 ? 4 : $album_sp_config['img_cols']);
+ $cols_width = (100 / $cols) . '%';
! // Last Comments
! if ($album_config['show_last_comments'] == 1)
! {
! album_build_last_comments_info($allowed_cat);
! }
! // Recent Public Pics
! if ($album_sp_config['disp_late'] == 1)
! {
! album_build_recent_pics($allowed_cat);
! }
! // Highest Rated Pics
! if ($album_sp_config['disp_high'] == 1)
! {
! album_build_highest_rated_pics($allowed_cat);
! }
! // Most Viewed Pics
! if ($album_sp_config['disp_mostv'] == 1)
! {
! album_build_most_viewed_pics($allowed_cat);
! }
! //Random Pics
! if ($album_sp_config['disp_rand'] == 1)
! {
! album_build_random_pics($allowed_cat);
! }
! $otf_link = ($userdata['user_level'] == ADMIN) ? mx_append_sid(this_smartor_mxurl("smartor_mode=album_otf" . '&sid=' . $userdata['session_id'])) : mx_append_sid(this_smartor_mxurl("smartor_mode=album_otf"));
! $template->assign_vars(array(
! 'ALBUM_NAV' => $album_nav_cat_desc,
! 'S_COLS' => $cols,
! 'S_COL_WIDTH' => $cols_width,
! 'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '',
! 'L_RAND_PICS' => $lang['Random_Public_Pics'],
! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Pics'],
! 'L_HI_RATINGS' => $lang['Toprated_Public_Pics'],
! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Pics'],
! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Pics'],
! 'L_MOST_VIEWED' => $lang['Most_Public_Pics'],
! 'L_NO_PICS' => $lang['No_Pics'],
! 'L_PIC_TITLE' => $lang['Pic_Image'],
! 'L_PIC_ID' => $lang['Pic_ID'],
! 'L_VIEW' => $lang['View'],
! 'L_POSTER' => $lang['Pic_Poster'],
! 'L_POSTED' => $lang['Posted'],
! 'L_ALBUM_ALLPICS' => $lang['All_Picture_List_Of_User'],
! 'L_ALBUM_OTF' => $lang['Pic_Gallery'],
! 'U_ALBUM_ALLPICS' => mx_append_sid(this_smartor_mxurl("smartor_mode=album_allpics")),
! 'OTF_LINK' => $otf_link,
! 'U_ALBUM_OTF' => $otf_link)
! );
// it's a personal gallery, and in the root folder
Index: db_install.php
===================================================================
RCS file: /cvsroot/mxbb/mx_smartor/db_install.php,v
retrieving revision 1.33
retrieving revision 1.34
diff -C2 -d -r1.33 -r1.34
*** db_install.php 21 Feb 2011 09:36:45 -0000 1.33
--- db_install.php 3 Mar 2011 14:28:40 -0000 1.34
***************
*** 52,62 ****
}
! $mx_module_version = '2.9.8';
! $mx_module_copy = 'Mx-Publisher <i> - smartor album FAP </i> module by <a href="http://www.mx-publisher.com/" target="_blank">Jon Ohlsson</a> & <a href="http://www.caleacrestina.com/" target="_blank">Florin C. Bodin</a> & <a href="http://www.icyphoenix.com/" target="_blank">Mighty Gorgon</a> & <a href="http://smartor.is-root.com/" target="_blank">Smartor</a>';
// If upgrading from old mx album
if( $result = $db->sql_query("SELECT config_name from ".$mx_table_prefix."album_config"))
{
! $message = "<b>Upgrading!...to use Clown SP...from old mx album </b><br/><br/>";
$sql = array();
--- 52,62 ----
}
! $mx_module_version = '2.9.9';
! $mx_module_copy = 'Mx-Publisher <i> - smartor album FAP </i> module by <a href="" target="_blank">Jon Ohlsson</a> & <a href="http://mxpcms.sourceforge.net/" target="_blank">Florin C. Bodin</a> & <a href="http://www.icyphoenix.com/" target="_blank">Mighty Gorgon</a> & <a href="http://smartor.is-root.com/" target="_blank">Smartor</a>';
// If upgrading from old mx album
if( $result = $db->sql_query("SELECT config_name from ".$mx_table_prefix."album_config"))
{
! $message = "<b>Upgrading!...to use Clown SP...from old mx album </b><br/><br/>";
$sql = array();
***************
*** 177,193 ****
$message .= "<b>OK...</b><br /><br />";
! while($sql[$n])
! {
! $message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br />' : '';
! if(!$result = $db->sql_query($sql[$n]))
! {
! $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
! }
! else
{
! $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
}
- $n++;
- }
}
--- 177,193 ----
$message .= "<b>OK...</b><br /><br />";
! while($sql[$n])
{
! $message .= ($mods[$n-1] != $mods[$n]) ? '<p><b><font size=3>'.$mods[$n].'</font></b><br />' : '';
! if(!$result = $db->sql_query($sql[$n]))
! {
! $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
! }
! else
! {
! $message .='<b><font color=#0000fF>[Added/Updated]</font></b> line: '.($n+1).' , '.$sql[$n].'<br />';
! }
! $n++;
}
}
***************
*** 251,255 ****
) TYPE=MyISAM";
-
$sql[] = "CREATE TABLE ".$mx_table_prefix."smartor_album_cat (
cat_id mediumint(8) UNSIGNED NOT NULL auto_increment,
--- 251,254 ----
Index: db_upgrade.php
===================================================================
RCS file: /cvsroot/mxbb/mx_smartor/db_upgrade.php,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** db_upgrade.php 21 Feb 2011 09:36:45 -0000 1.30
--- db_upgrade.php 3 Mar 2011 14:28:40 -0000 1.31
***************
*** 30,35 ****
}
! $mx_module_version = '2.9.8';
! $mx_module_copy = 'Mx-Publisher <i> - smartor album FAP </i> module by <a href="http://www.mx-publisher.com/" target="_blank">Jon Ohlsson</a> & <a href="http://www.caleacrestina.com/" target="_blank">Florin C. Bodin</a> & <a href="http://www.icyphoenix.com/" target="_blank">Mighty Gorgon</a> & <a href="http://smartor.is-root.com/" target="_blank">Smartor</a>';
$sql = array();
--- 30,35 ----
}
! $mx_module_version = '2.9.9';
! $mx_module_copy = 'Mx-Publisher <i> - smartor album FAP </i> module by <a href="" target="_blank">Jon Ohlsson</a> & <a href="http://mxpcms.sourceforge.net/" target="_blank">Florin C. Bodin</a> & <a href="http://www.icyphoenix.com/" target="_blank">Mighty Gorgon</a> & <a href="http://smartor.is-root.com/" target="_blank">Smartor</a>';
$sql = array();
***************
*** 44,54 ****
//
$upgrade_2000 = 0;
! $upgrade_2001 = 0;
//
// validate before 2.00
//
! $result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "smartor_album_config WHERE config_name = 'enable_integration'" );
! if ( $db->sql_numrows( $result ) == 0 )
{
$upgrade_2000 = 1;
--- 44,55 ----
//
$upgrade_2000 = 0;
! $upgrade_2100 = 0;
! $upgrade_2142 = 0;
//
// validate before 2.00
//
! $result = $db->sql_query( "SELECT cat_user_id from " . $mx_table_prefix . "smartor_album_cat" );
! if (@$db->sql_numrows($result) == 0)
{
$upgrade_2000 = 1;
***************
*** 56,69 ****
$result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "smartor_album_config WHERE config_name = 'show_otf_link'" );
! if ( $db->sql_numrows( $result ) == 0 )
{
! $upgrade_2001 = 1;
}
!
$message = "<b>Upgrading!</b><br/><br/>";
! if ( $upgrade_2000 == 1 )
{
! $message .= "<b>Upgrading to v. 2.00 Beta 1...</b><br/><br/>";
$sql[] = "UPDATE ". $mx_table_prefix ."smartor_album_config
--- 57,70 ----
$result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "smartor_album_config WHERE config_name = 'show_otf_link'" );
! if (@$db->sql_numrows($result) == 0)
{
! $upgrade_2100 = 1;
}
!
$message = "<b>Upgrading!</b><br/><br/>";
! if ($upgrade_2000 = 1)
{
! $message .= "<b>Upgrading to v. 2.00...</b><br/><br/>";
$sql[] = "UPDATE ". $mx_table_prefix ."smartor_album_config
***************
*** 146,152 ****
$sql[] = "INSERT INTO ".$mx_table_prefix."smartor_album_sp_config VALUES ('disp_mostv', '1')";
}
! if ( $upgrade_2001 == 1 )
{
! $message .= "<b>Upgrading to v. 2.00 Beta 2...</b><br/><br/>";
$sql[] = "UPDATE ". $mx_table_prefix ."smartor_album_config
SET config_value = '1.4.2'
--- 147,158 ----
$sql[] = "INSERT INTO ".$mx_table_prefix."smartor_album_sp_config VALUES ('disp_mostv', '1')";
}
! else
{
! $message .= "<b>Nothing to upgrade...</b><br/><br/>";
! }
!
! if ($upgrade_2100 = 1)
! {
! $message .= "<b>Upgrading to v. 2.100...</b><br/><br/>";
$sql[] = "UPDATE ". $mx_table_prefix ."smartor_album_config
SET config_value = '1.4.2'
***************
*** 157,163 ****
$sql[] = "INSERT INTO ".$mx_table_prefix."smartor_album_config VALUES ('show_personal_galleries_link', '1')";
$sql[] = "ALTER TABLE ".$mx_table_prefix."smartor_album ADD comment_cat_id int(11) NOT NULL default '0' AFTER comment_pic_id";
! $sql[] = "ALTER TABLE ".$mx_table_prefix . "smartor_album MODIFY pic_title mediumtext";
! $sql[] = "ALTER TABLE ".$mx_table_prefix . "smartor_album MODIFY pic_desc mediumtext";
$sql[] = "ALTER TABLE ".$mx_table_prefix."smartor_album_comment ADD comment_cat_id int(11) NOT NULL default '0' AFTER comment_pic_id";
}
else
--- 163,170 ----
$sql[] = "INSERT INTO ".$mx_table_prefix."smartor_album_config VALUES ('show_personal_galleries_link', '1')";
$sql[] = "ALTER TABLE ".$mx_table_prefix."smartor_album ADD comment_cat_id int(11) NOT NULL default '0' AFTER comment_pic_id";
! $sql[] = "ALTER TABLE ".$mx_table_prefix."smartor_album MODIFY pic_title mediumtext";
! $sql[] = "ALTER TABLE ".$mx_table_prefix."smartor_album MODIFY pic_desc mediumtext";
$sql[] = "ALTER TABLE ".$mx_table_prefix."smartor_album_comment ADD comment_cat_id int(11) NOT NULL default '0' AFTER comment_pic_id";
+ $sql[] = "ALTER TABLE ".$mx_table_prefix."smartor_album_cat ADD cat_user_id mediumint(8) unsigned default '0' AFTER cat_parent";
}
else
|
|
From: Florin C B. <ory...@us...> - 2011-03-03 14:28:42
|
Update of /cvsroot/mxbb/mx_smartor/album_mod/includes
In directory vz-cvs-4.sog:/tmp/cvs-serv24509/album_mod/includes
Modified Files:
album_functions.php album_hierarchy_functions.php
album_hierarchy_sql.php album_image_class.php
Log Message:
some updated for PHP 5.3.0 decapritated functions
Index: album_hierarchy_functions.php
===================================================================
RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_hierarchy_functions.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** album_hierarchy_functions.php 10 Oct 2008 01:56:05 -0000 1.5
--- album_hierarchy_functions.php 3 Mar 2011 14:28:40 -0000 1.6
***************
*** 370,374 ****
$first_pic_id = album_get_first_pic_id($cur_cat_id);
$last_pic_id = album_get_last_pic_id($ss_cat_id);
! $slideshow_link = mx_append_sid(this_fap_portalurl("smartor_mode=album_showpage" . "&pic_id=" . $last_pic_id . "&slideshow=5"));
$slideshow_link_full = '[<a href="' . $slideshow_link . '">' . $lang['Slideshow'] . '</a>]';
//$slideshow_link_full = '<a href="' . $slideshow_link . '">' . $lang['Slideshow'] . ' ' . $slideshow_img . '</a>';
--- 370,374 ----
$first_pic_id = album_get_first_pic_id($cur_cat_id);
$last_pic_id = album_get_last_pic_id($ss_cat_id);
! $slideshow_link = mx_append_sid(this_smartor_mxurl("smartor_mode=album_showpage" . "&pic_id=" . $last_pic_id . "&slideshow=5", false));
$slideshow_link_full = '[<a href="' . $slideshow_link . '">' . $lang['Slideshow'] . '</a>]';
//$slideshow_link_full = '<a href="' . $slideshow_link . '">' . $lang['Slideshow'] . ' ' . $slideshow_img . '</a>';
***************
*** 618,625 ****
else
{
! $pic_url_sid = mx_append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=" . $last_pic_id));
$pic_target = '_blank';
}
! $pic_thumb_sid = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $last_pic_id));
if ($last_pic_id == 0)
--- 618,625 ----
else
{
! $pic_url_sid = mx_append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=" . $last_pic_id, true));
$pic_target = '_blank';
}
! $pic_thumb_sid = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $last_pic_id, true));
if ($last_pic_id == 0)
***************
*** 641,645 ****
if ( !empty($links) )
{
! if ( ($user_id==ALBUM_PUBLIC_GALLERY && $album_config['show_index_subcats']==1) || ($user_id!=ALBUM_PUBLIC_GALLERY && $album_config['personal_show_subcats_in_index']==1) )
{
$template->assign_block_vars('catmain.catrow.subcat_link', array(
--- 641,645 ----
if ( !empty($links) )
{
! if ( ($user_id==ALBUM_PUBLIC_GALLERY && $album_config['show_index_subcats'] == 1) || ($user_id != ALBUM_PUBLIC_GALLERY && $album_config['personal_show_subcats_in_index'] == 1) )
{
$template->assign_block_vars('catmain.catrow.subcat_link', array(
Index: album_image_class.php
===================================================================
RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_image_class.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** album_image_class.php 23 Jul 2010 11:29:15 -0000 1.4
--- album_image_class.php 3 Mar 2011 14:28:40 -0000 1.5
***************
*** 172,176 ****
header("Content-type: " . $this->ImageMimeType());
header("Content-Length: " . $this->ImageFilesize());
! header("Content-Disposition: filename=" . $pic_prefix . ereg_replace("[^A-Za-z0-9]", "_", $pic_name) . $pic_suffix . $pic_filetype);
switch ($this->ImageTypeNo()){
case IMG_GIF:
--- 172,176 ----
header("Content-type: " . $this->ImageMimeType());
header("Content-Length: " . $this->ImageFilesize());
! header("Content-Disposition: filename=" . $pic_prefix . preg_replace("/[^A-Za-z0-9]/", "_", $pic_name) . $pic_suffix . $pic_filetype);
switch ($this->ImageTypeNo()){
case IMG_GIF:
***************
*** 201,205 ****
}
header("Content-type: image/jpeg");
! header("Content-Disposition: filename=" . $pic_prefix . ereg_replace("[^A-Za-z0-9]", "_", $pic_name) . $pic_suffix . $pic_filetype);
imagejpeg($this->ImageID, "", $this->JpegQuality($jpg_quality));
return true;
--- 201,205 ----
}
header("Content-type: image/jpeg");
! header("Content-Disposition: filename=" . $pic_prefix . preg_replace("/[^A-Za-z0-9]/", "_", $pic_name) . $pic_suffix . $pic_filetype);
imagejpeg($this->ImageID, "", $this->JpegQuality($jpg_quality));
return true;
Index: album_functions.php
===================================================================
RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_functions.php,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** album_functions.php 21 Feb 2011 09:36:45 -0000 1.9
--- album_functions.php 3 Mar 2011 14:28:40 -0000 1.10
***************
*** 1265,1268 ****
--- 1265,1433 ----
}
+
+ function picture_quick_thumb($pic_filename, $pic_thumbnail, $thumbnail_file)
+ {
+ if (USERS_SUBFOLDERS_ALBUM == true)
+ {
+ if (strpos($pic_filename, '/') !== false)
+ {
+ $pic_path[] = array();
+ $pic_path = explode('/', $pic_filename);
+ $pic_filename = $pic_path[count($pic_path) - 1];
+ }
+ }
+
+ $file_part = explode('.', strtolower($pic_filename));
+ $pic_filetype = $file_part[count($file_part) - 1];
+ $pic_filename_only = substr($pic_filename, 0, strlen($pic_filename) - strlen($pic_filetype) - 1);
+ $pic_base_path = ALBUM_UPLOAD_PATH;
+ $pic_extra_path = '';
+ $pic_new_filename = $pic_extra_path . $pic_filename;
+ $pic_fullpath = $pic_base_path . $pic_new_filename;
+ $pic_thumbnail = ($pic_thumbnail != '') ? $pic_thumbnail : (md5($pic_filename) . '.' . $pic_filetype);
+ $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail;
+
+ if (USERS_SUBFOLDERS_ALBUM == true)
+ {
+ if (count($pic_path) == 2)
+ {
+ $pic_extra_path = $pic_path[0] . '/';
+ $pic_thumbnail_path = ALBUM_CACHE_PATH . $pic_extra_path;
+ if (is_dir($pic_thumbnail_path))
+ {
+ $pic_new_filename = $pic_extra_path . $pic_filename;
+ $pic_fullpath = $pic_base_path . $pic_new_filename;
+ $pic_thumbnail_fullpath = $pic_thumbnail_path . $pic_thumbnail;
+ }
+ }
+ }
+
+ if (file_exists($pic_thumbnail_fullpath))
+ {
+ $thumbnail_file = $pic_thumbnail_fullpath;
+ }
+ return $thumbnail_file;
+ }
+
+ function pic_info($pic_filename, $pic_thumbnail, $pic_title = '')
+ {
+ $pic_info = array();
+ $pic_info['exists'] = false;
+ $pic_info['filename'] = $pic_filename;
+ $pic_info['thumbnail'] = $pic_thumbnail;
+ $pic_info['title'] = $pic_title;
+ if (USERS_SUBFOLDERS_ALBUM == true)
+ {
+ if (strpos($pic_info['filename'], '/') !== false)
+ {
+ $pic_path[] = array();
+ $pic_path = explode('/', $pic_info['filename']);
+ $pic_info['filename'] = $pic_path[count($pic_path) - 1];
+ }
+ }
+
+ $file_part = explode('.', strtolower($pic_info['filename']));
+ $pic_info['filetype'] = $file_part[count($file_part) - 1];
+ $pic_info['filename_only'] = substr($pic_info['filename'], 0, strlen($pic_info['filename']) - strlen($pic_info['filetype']) - 1);
+ $pic_info['base_path'] = ALBUM_UPLOAD_PATH;
+ $pic_info['base_t_s_path'] = ALBUM_CACHE_PATH;
+ $pic_info['base_t_m_path'] = ALBUM_MED_CACHE_PATH;
+ $pic_info['base_t_w_path'] = ALBUM_WM_CACHE_PATH;
+ $pic_info['extra_path'] = '';
+ $pic_info['new_filename'] = $pic_info['extra_path'] . $pic_info['filename'];
+ $pic_info['fullpath'] = $pic_info['base_path'] . $pic_info['new_filename'];
+ $pic_info['thumbnail_new'] = md5($pic_info['filename']) . '.' . $pic_info['filetype'];
+ $pic_info['thumbnail'] = ($pic_info['thumbnail'] == '') ? $pic_info['thumbnail_new'] : $pic_info['thumbnail'];
+ $thumbs_prefixes = array('s', 'm', 'w');
+ for ($i = 0; $i < count($thumbs_prefixes); $i++)
+ {
+ $cp = $thumbs_prefixes[$i];
+ $pic_info['thumbnail_' . $cp . '_fullpath'] = $pic_info['base_t_' . $cp . '_path'] . $pic_info['thumbnail'];
+ $pic_info['thumbnail_new_' . $cp . '_fullpath'] = $pic_info['base_t_' . $cp . '_path'] . $pic_info['thumbnail_new'];
+ if ($cp == 'w')
+ {
+ $pic_info['thumbnail_' . $cp . '_f_fullpath'] = $pic_info['base_t_' . $cp . '_path'] . 'full_' . $pic_info['thumbnail'];
+ $pic_info['thumbnail_new_' . $cp . '_f_fullpath'] = $pic_info['base_t_' . $cp . '_path'] . 'full_' . $pic_info['thumbnail_new'];
+ }
+ }
+ $pic_info['title_reg'] = preg_replace("/[^A-Za-z0-9]/", "_", $pic_info['title']);
+
+ if (USERS_SUBFOLDERS_ALBUM == true)
+ {
+ if (count($pic_path) == 2)
+ {
+ $pic_info['extra_path'] = $pic_path[0] . '/';
+ if (is_dir($pic_info['base_path'] . $pic_info['extra_path']))
+ {
+ $pic_info['new_filename'] = $pic_info['extra_path'] . $pic_info['filename'];
+ $pic_info['fullpath'] = $pic_info['base_path'] . $pic_info['new_filename'];
+ }
+ else
+ {
+ $pic_info['exists'] = false;
+ return $pic_info;
+ }
+
+ for ($i = 0; $i < count($thumbs_prefixes); $i++)
+ {
+ $cp = $thumbs_prefixes[$i];
+ $dir_exists = false;
+ $current_t_path = $pic_info['base_t_' . $cp . '_path'] . $pic_info['extra_path'];
+ if (is_dir($current_t_path))
+ {
+ $dir_exists = true;
+ }
+ else
+ {
+ $dir_creation = @mkdir($current_t_path, 0777);
+ if ($dir_creation == true)
+ {
+ @copy($pic_info['base_path'] . 'index.html', $current_t_path . 'index.html');
+ @chmod($current_t_path . 'index.html', 0755);
+ $dir_exists = true;
+ }
+ }
+
+ if ($dir_exists == true)
+ {
+ $pic_info['thumbnail_' . $cp . '_fullpath'] = $current_t_path . $pic_info['thumbnail'];
+ $pic_info['thumbnail_new_' . $cp . '_fullpath'] = $current_t_path . $pic_info['thumbnail_new'];
+ if ($cp == 'w')
+ {
+ $pic_info['thumbnail_' . $cp . '_f_fullpath'] = $current_t_path . 'full_' . $pic_info['thumbnail'];
+ $pic_info['thumbnail_new_' . $cp . '_f_fullpath'] = $current_t_path . 'full_' . $pic_info['thumbnail_new'];
+ }
+ }
+ }
+ }
+ }
+ $pic_info['exists'] = true;
+ return $pic_info;
+ }
+
+ if (!function_exists('setFlag'))
+ {
+ function setFlag($flags, $flag)
+ {
+ return $flags | $flag;
+ }
+ }
+
+ if (!function_exists('clearFlag'))
+ {
+ function clearFlag($flags, $flag)
+ {
+ return ($flags & ~$flag);
+ }
+ }
+
+ if (!function_exists('checkFlag'))
+ {
+ function checkFlag($flags, $flag)
+ {
+ return (($flags & $flag) == $flag) ? true : false;
+ }
+ }
+
/**
* Enter description here...
Index: album_hierarchy_sql.php
===================================================================
RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_hierarchy_sql.php,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** album_hierarchy_sql.php 5 Oct 2008 22:59:10 -0000 1.10
--- album_hierarchy_sql.php 3 Mar 2011 14:28:40 -0000 1.11
***************
*** 587,591 ****
// remove all the alpha characters from the string, since they aren't needed anymore
! $check_date = ereg_replace("[A-Z]+", "", trim($check_date));
// doa final test to see if it's a valid checkm further more
--- 587,591 ----
// remove all the alpha characters from the string, since they aren't needed anymore
! $check_date = preg_replace("/[A-Z]+/", "", trim($check_date));
// doa final test to see if it's a valid checkm further more
***************
*** 1369,1373 ****
}
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $recentrow[$j]['pic_id']));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
--- 1369,1373 ----
}
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $recentrow[$j]['pic_id'], true));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
***************
*** 1538,1542 ****
}
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $highestrow[$j]['pic_id']));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
--- 1538,1542 ----
}
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $highestrow[$j]['pic_id'], true));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
***************
*** 1707,1711 ****
}
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $mostviewed[$j]['pic_id']));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
--- 1707,1711 ----
}
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $mostviewed[$j]['pic_id'], true));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
***************
*** 1863,1867 ****
}
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $randrow[$j]['pic_id']));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
--- 1863,1867 ----
}
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $randrow[$j]['pic_id'], true));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
***************
*** 2059,2063 ****
$image_comment = ($commentsrow[$i]['comments'] == 0) ? $lang['Not_commented'] : $commentsrow[$i]['comments'];
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $commentsrow[$i]['pic_id']));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
--- 2059,2063 ----
$image_comment = ($commentsrow[$i]['comments'] == 0) ? $lang['Not_commented'] : $commentsrow[$i]['comments'];
! $thumbnail_file = mx_append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=" . $commentsrow[$i]['pic_id'], true));
if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) )
{
|
|
From: Florin C B. <ory...@us...> - 2011-02-27 00:50:01
|
Update of /cvsroot/mxbb/core/includes
In directory vz-cvs-4.sog:/tmp/cvs-serv3649
Modified Files:
mx_functions.php mx_functions_tools.php
Log Message:
phpbb 2.3.0 fix
Index: mx_functions_tools.php
===================================================================
RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v
retrieving revision 1.62
retrieving revision 1.63
diff -C2 -d -r1.62 -r1.63
*** mx_functions_tools.php 26 Feb 2011 02:58:46 -0000 1.62
--- mx_functions_tools.php 27 Feb 2011 00:49:59 -0000 1.63
***************
*** 1319,1323 ****
return $mytext;
}
!
/**
* Enter description here...
--- 1319,1323 ----
return $mytext;
}
!
/**
* Enter description here...
***************
*** 1331,1335 ****
* @return unknown
*/
! function _magic_url( $url )
{
global $board_config;
--- 1331,1335 ----
* @return unknown
*/
! function _magic_url($url)
{
global $board_config;
***************
*** 1713,1717 ****
// Includes
//
! if( !function_exists('prepare_message') )
{
//include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_post.' . $phpEx);
--- 1713,1717 ----
// Includes
//
! if(!function_exists('prepare_message'))
{
//include_once($mx_root_path . 'includes/shared/phpbb2/includes/functions_post.' . $phpEx);
***************
*** 2013,2017 ****
if ( !$result = $db->sql_query($sql) )
{
! mx_message_die(GENERAL_ERROR, 'Could not find oldest privmsgs (inbox)', '', __LINE__, __FILE__, $sql);
}
--- 2013,2017 ----
if ( !$result = $db->sql_query($sql) )
{
! //mx_message_die(GENERAL_ERROR, 'Could not find oldest privmsgs (inbox)', '', __LINE__, __FILE__, $sql);
}
***************
*** 2024,2028 ****
if ( !$db->sql_query($sql) )
{
! mx_message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (inbox)'.$sql, '', __LINE__, __FILE__, $sql);
}
--- 2024,2028 ----
if ( !$db->sql_query($sql) )
{
! //mx_message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs (inbox)'.$sql, '', __LINE__, __FILE__, $sql);
}
***************
*** 2032,2036 ****
if ( !$db->sql_query($sql) )
{
! mx_message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (inbox)', '', __LINE__, __FILE__, $sql);
}
}
--- 2032,2036 ----
if ( !$db->sql_query($sql) )
{
! //mx_message_die(GENERAL_ERROR, 'Could not delete oldest privmsgs text (inbox)', '', __LINE__, __FILE__, $sql);
}
}
Index: mx_functions.php
===================================================================
RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v
retrieving revision 1.100
retrieving revision 1.101
diff -C2 -d -r1.100 -r1.101
*** mx_functions.php 26 Feb 2011 03:10:30 -0000 1.100
--- mx_functions.php 27 Feb 2011 00:49:59 -0000 1.101
***************
*** 386,390 ****
--- 386,406 ----
else
{
+ if (file_exists($mx_root_path . TEMPLATE_ROOT_PATH . 'msgdie_header.tpl'))
+ {
+ $layouttemplate->set_filenames(array(
+ 'overall_header' => 'msgdie_header.tpl',
+ ));
+ $layouttemplate->pparse('overall_header');
+ }
+
echo "<html>\n<body>\n" . $msg_title . "\n<br /><br />\n" . $msg_text . "</body>\n</html>";
+
+ if (file_exists($mx_root_path . TEMPLATE_ROOT_PATH . 'msgdie_footer.tpl'))
+ {
+ $layouttemplate->set_filenames(array(
+ 'overall_footer' => 'msgdie_footer.tpl',
+ ));
+ $layouttemplate->pparse('overall_footer');
+ }
}
***************
*** 1755,1759 ****
// $do_gzip_compress = FALSE;
! if ( $board_config['gzip_compress'] && !defined('MX_GZIP_DISABLED') )
{
$phpver = phpversion();
--- 1771,1775 ----
// $do_gzip_compress = FALSE;
! if ($board_config['gzip_compress'] && !defined('MX_GZIP_DISABLED'))
{
$phpver = phpversion();
***************
*** 1761,1767 ****
$useragent = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
! if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
! if ( extension_loaded('zlib') )
{
ob_end_clean();
--- 1777,1783 ----
$useragent = (isset($_SERVER['HTTP_USER_AGENT'])) ? $_SERVER['HTTP_USER_AGENT'] : getenv('HTTP_USER_AGENT');
! if ($phpver >= '4.0.4pl1' && (strstr($useragent,'compatible') || strstr($useragent,'Gecko')))
{
! if (extension_loaded('zlib'))
{
ob_end_clean();
***************
*** 1769,1777 ****
}
}
! else if ( $phpver > '4.0' )
{
! if ( strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
! if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
--- 1785,1793 ----
}
}
! else if ($phpver > '4.0')
{
! if (strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip'))
{
! if (extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
***************
*** 1788,1792 ****
--- 1804,1810 ----
// Initialize PHP session
//
+ //phpinfo();
session_start();
+ //
}
***************
*** 2406,2409 ****
--- 2424,2438 ----
/**
+ * Borrowed from phpBB
+ *
+ */
+ function mx_phpbb_realpath($path)
+ {
+ global $mx_root_path, $phpEx;
+
+ return (!@function_exists('realpath') || !@realpath($mx_root_path . 'includes/mx_functions.'.$phpEx)) ? $path : @realpath($path);
+ }
+
+ /**
* Get langcode.
*
***************
*** 2515,2517 ****
--- 2544,2561 ----
return $message;
}
+
+ /**
+ * function eregi
+ *
+ * temp replacement for eregi()
+ *
+ *
+ */
+ if (!@function_exists('eregi'))
+ {
+ function eregi($find, $str)
+ {
+ return stristr($str, $find);
+ }
+ }
?>
\ No newline at end of file
|
|
From: Florin C B. <ory...@us...> - 2011-02-26 03:10:32
|
Update of /cvsroot/mxbb/core/includes In directory vz-cvs-4.sog:/tmp/cvs-serv24246 Modified Files: mx_functions.php Log Message: phpbb 2.3.0 fix Index: mx_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions.php,v retrieving revision 1.99 retrieving revision 1.100 diff -C2 -d -r1.99 -r1.100 *** mx_functions.php 31 Oct 2008 19:02:20 -0000 1.99 --- mx_functions.php 26 Feb 2011 03:10:30 -0000 1.100 *************** *** 1788,1792 **** // Initialize PHP session // ! @session_start(); } --- 1788,1792 ---- // Initialize PHP session // ! session_start(); } |
|
From: Florin C B. <ory...@us...> - 2011-02-26 02:58:49
|
Update of /cvsroot/mxbb/core/includes
In directory vz-cvs-4.sog:/tmp/cvs-serv14075/includes
Modified Files:
mx_functions_tools.php
Log Message:
phpbb 2.3.0 fix
Index: mx_functions_tools.php
===================================================================
RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v
retrieving revision 1.61
retrieving revision 1.62
diff -C2 -d -r1.61 -r1.62
*** mx_functions_tools.php 11 Oct 2010 23:00:00 -0000 1.61
--- mx_functions_tools.php 26 Feb 2011 02:58:46 -0000 1.62
***************
*** 1359,1363 ****
$url = preg_replace( $match, $replace, $url );
// Also fix already tagged links
! $url = preg_replace( "/<a href=(.*?)>(.*?)<\/a>/ie", "(strlen(\"\\2\") > 25 && !eregi(\"<\", \"\\2\") ) ? '<a href='.stripslashes(\"\\1\").'>'.substr(str_replace(\"http://\",\"\",\"\\2\"), 0, 17) . '...</a>' : '<a href='.stripslashes(\"\\1\").'>'.\"\\2\".'</a>'", $url );
// $url = preg_replace("/<a href=(.*?)>(.*?)<\/a>/ie", "(strlen(\"\\2\") > 25 && !eregi(\"<\", \"\\2\") ) ? '<a href='.stripslashes(\"\\1\").'>'.substr(str_replace(\"http://\",\"\",\"\\2\"), 0, 12) . ' ... ' . substr(\"\\2\", -3).'</a>' : '<a href='.stripslashes(\"\\1\").'>'.\"\\2\".'</a>'", $url);
return $url;
--- 1359,1363 ----
$url = preg_replace( $match, $replace, $url );
// Also fix already tagged links
! $url = preg_replace( "/<a href=(.*?)>(.*?)<\/a>/ie", "(strlen(\"\\2\") > 25 && !stristr(\"\\2\", \"<\") ) ? '<a href='.stripslashes(\"\\1\").'>'.substr(str_replace(\"http://\",\"\",\"\\2\"), 0, 17) . '...</a>' : '<a href='.stripslashes(\"\\1\").'>'.\"\\2\".'</a>'", $url );
// $url = preg_replace("/<a href=(.*?)>(.*?)<\/a>/ie", "(strlen(\"\\2\") > 25 && !eregi(\"<\", \"\\2\") ) ? '<a href='.stripslashes(\"\\1\").'>'.substr(str_replace(\"http://\",\"\",\"\\2\"), 0, 12) . ' ... ' . substr(\"\\2\", -3).'</a>' : '<a href='.stripslashes(\"\\1\").'>'.\"\\2\".'</a>'", $url);
return $url;
|
|
From: Florin C B. <ory...@us...> - 2011-01-25 12:23:48
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv25917 Modified Files: core.php Log Message: Index: core.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/core.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** core.php 23 Apr 2010 19:39:53 -0000 1.23 --- core.php 25 Jan 2011 12:23:40 -0000 1.24 *************** *** 749,753 **** global $table_prefix, $mx_root_path; ! require $mx_root_path. "includes/sessions/phpbb3/constants.$phpEx"; } --- 749,753 ---- global $table_prefix, $mx_root_path; ! require $mx_root_path. "includes/sessions/phpbb2/constants.$phpEx"; } |
|
From: Florin C B. <ory...@us...> - 2011-01-08 09:12:15
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv11519 Modified Files: db_upgrade.php Log Message: Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_upgrade.php,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** db_upgrade.php 2 Dec 2009 03:49:00 -0000 1.35 --- db_upgrade.php 8 Jan 2011 09:12:07 -0000 1.36 *************** *** 112,116 **** // validate before 2.2.6 ! if ( !$result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "pa_config WHERE config_name = 'resize_ss'" ); { $upgrade_226 = 1; --- 112,116 ---- // validate before 2.2.6 ! if ( !$result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "pa_config WHERE config_name = 'resize_ss'" )) { $upgrade_226 = 1; |
|
From: Florin C B. <ory...@us...> - 2011-01-07 17:14:15
|
Update of /cvsroot/mxbb/mx_smartor/album_mod/includes/fap_not_ported In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv7864/includes/fap_not_ported Added Files: album_memberlist.php album_personal.php Log Message: fixed old readfile by replacing with full GD functions --- NEW FILE: album_personal.php --- <?php /*************************************************************************** * album_personal.php * ------------------------------------------------ * begin : Friday, June 12, 2004 * copyright : (C) 2004 IdleVoid * email : idl...@sl... * file version : 1.0.8 * release : 1.2.0 ****************************************************************************/ /*************************************************************************** * * 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. * ***************************************************************************/ if ( !defined('IN_PORTAL') ) { die('Hacking attempt'); } // ------------------------------------------------------------------------ // This file is only included in the album.php and album_cat.php, it should // be stored in the album_mod folder // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ // $album_user_id, $cat_id and $moderators_list are as default set // in album.php and in album_cat.php files in the main folder. // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ // Get the name of this user // ------------------------------------------------------------------------ $username = album_get_user_name($album_user_id); if (empty($username)) { mx_message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']); } $moderators_list = empty($moderators_list) ? $username : ',' . $username; // check if personal gallery root category exists if (ALBUM_ROOT_CATEGORY == ($check_cat_id = album_get_personal_root_id($album_user_id))) { // if it doesn't then create the 'fake' category so we can authenticate it $thiscat = init_personal_gallery_cat($album_user_id); $cat_id = $check_cat_id; } else { if (empty($cat_id) || $cat_id == 0) { $cat_id = $check_cat_id; } $thiscat = $album_data['data'][ $album_data['keys'][$cat_id] ]; } // ------------------------------------------------------------------------ // Check view permissions // ------------------------------------------------------------------------ $auth_data = album_permissions($album_user_id, $cat_id, ALBUM_AUTH_ALL, $thiscat); if ( !album_check_permission($auth_data, ALBUM_AUTH_VIEW) ) { if (!$userdata['session_logged_in']) { redirect(append_sid(LOGIN_MG . "?redirect=album.$phpEx&user_id=$album_user_id")); } else { mx_message_die(GENERAL_MESSAGE, $lang['Not_Authorised']); } } // // END check permissions // // ------------------------------------------------------------------------ // Check personal gallery creation/upload permission // ------------------------------------------------------------------------ if ( !album_check_permission($auth_data, ALBUM_AUTH_UPLOAD) && (count($album_data['data']) <= 1) ) { if ($album_user_id == $userdata['user_id']) { mx_message_die(GENERAL_MESSAGE, $lang['Not_allowed_to_create_personal_gallery']); } } // // End check own gallery // // ------------------------------------------------------------------------ // Check we are the root of the personal gallery and if it have // children or parents // ------------------------------------------------------------------------ // if $cat_id is equal to the non existing root category id, then it wasn't supplied to the call of the page // try to get the personal gallery root category instead (if it doesn't exists it returns ALBUM_ROOT_CATEGORY if ($cat_id == ALBUM_ROOT_CATEGORY) { $cat_id = album_get_personal_root_id($album_user_id); } $is_root_cat = ( ($cat_id == album_get_personal_root_id($album_user_id) || $cat_id == ALBUM_ROOT_CATEGORY) ? true : false); $has_sub_cats = album_has_sub_cats($cat_id); $has_parent_cats = album_has_parent_cats($cat_id); // ------------------------------------------------------------------------ // Setup the correct link page // ------------------------------------------------------------------------ if ($is_root_cat) { $album_page_url = 'album.'.$phpEx; } else { $album_page_url = 'album_cat.'.$phpEx; } include($phpbb_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'body' => 'album_cat_body.tpl') ); $auth_list = album_build_auth_list($album_user_id, $cat_id, $auth_data); //$auth_list = album_build_auth_list($album_user_id, $cat_id); // ------------------------------------------------------------------------ // Setup the correct variables and string acording to if we are showing all // the pictures or a category, this is infact the 'main' difference betwwen // these tho 'view modes'.. the rest is done in 'album_build_picture_table' // ------------------------------------------------------------------------ if ($album_view_mode != ALBUM_VIEW_ALL) { $album_nav_cat_desc = album_make_nav_tree($cat_id, $album_page_url, 'nav', $album_user_id); if (!empty($album_nav_cat_desc)) { $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc; } $cat_ids = $cat_id; $image_toggle_button = $images['all_pic_view_mode']; $view_mode_url = append_sid(album_append_uid("$album_page_url?cat_id=" . intval($cat_id) . "&mode=" . ALBUM_VIEW_ALL)); $view_mode_text = $lang['Show_all_pic_view_mode']; } else { $album_nav_cat_desc = album_make_nav_tree(album_get_personal_root_id($album_user_id), $album_page_url, 'nav', $album_user_id); if (!empty($album_nav_cat_desc)) { $album_nav_cat_desc = ALBUM_NAV_ARROW . $album_nav_cat_desc; } if (album_get_personal_root_id($album_user_id) != $cat_id) { $allowed_cat = $cat_id; $tmp_array = array(); album_get_sub_cat_ids(album_get_personal_root_id($album_user_id), $tmp_array, ALBUM_AUTH_VIEW, true); reset($tmp_array); while (list($key, $id) = each($tmp_array)) { if ($id != $cat_id) { $allowed_cat .= ',' . $id; } } } $cat_ids = $allowed_cat; $image_toggle_button = $images['normal_pic_view_mode']; $view_mode_url = append_sid(album_append_uid("$album_page_url?cat_id=" . intval($cat_id))); $view_mode_text = $lang['Show_selected_pic_view_mode']; } // ------------------------------------------------------------------------ // Count Pics of the root category of personal gallery, // - $cat_ids is set in the above IF statement // ------------------------------------------------------------------------ if ( $cat_ids == '') { $cat_ids = 0; } $sql = 'SELECT COUNT(p.pic_id) AS count FROM '. ALBUM_TABLE .' AS p, ' . ALBUM_CAT_TABLE .' AS c WHERE c.cat_user_id = '.$album_user_id.' AND c.cat_id IN (' . $cat_ids . ') AND p.pic_cat_id = c.cat_id'; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not count pics !!', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $total_pics = $row['count']; // ------------------------------------------------------------------------ // Build up the page // ------------------------------------------------------------------------ // // I will try to explain how this SHOULD work. Only some testing and studying // of the code will tell if really does do what it should. // // NOTE : this might be change alittle AFTER this has been written so don't // take it for granted that it does work this way a 100% // But feel free to tell me if this(the description) need updating or // if the code needs fixing. // // $cat_id : is the currently selected category // $allowed_cat: is a list of all the allowed categories that the current user // is allowed to view // £cat_ids : is synomous with $allowed_cat OR $cat_id, depending on the view mode // // 0: Begin of 'work flow' // // 1: Check if there are any pictures for the selected catery OR for the selected // categories (when in 'simple view' mode - see $allowed_cat above) // - No: No pictures found, go to step 2 // - Yes: One or more pictures found, go to step 5 // // 2: Do another check to see if the use got any pictures in all of her // personal gallery categories, that the current user is allowed to view // - No: No pictures found, goto step 3 // - Yes: One or more pictures found, goto step 4 // // 3: The personal gallery does not have _ANY_pictures at all OR does not have _ANY_ // at all the current user can view. Goto step 8 // // 4: Only display the recent pictures of all the categories in this personal gallery // Goto step 10 // // 5: Check if we are in simple view mode // - No: goto step 6 // - Yes: goto step 7 // // 6: We are not in simple view mode, so display the pictures in the category and // if enabled; the recent pictures of the this category and it's sub categories. // Goto step 10 // // 7: We are in simple mode, so only display the ALL the pictures of the personal gallery // which can be view by the currently logged in user. // Goto step 10 // // 8: Check if personal gallery got sub categories (which can be viewed by current user) // - Yes: Display no picture message, since ther really are't any pictures to display // - No: Display message to logged in user that the gallery doesn't exists. // Goto step 10 // // 9: Display message to logged in user that the gallery doesn't exists. // Goto step 10 // // 10: End of 'work flow' // // ------------------------------------------------------------------------ $no_personal_gallery = false; if ($row['count'] == 0) { if ( !strstr($album_nav_cat_desc, sprintf($lang['Personal_Gallery_Of_User'], $username)) ) { $album_nav_cat_desc .= ALBUM_NAV_ARROW . '<a href="'. append_sid(album_append_uid("album.$phpEx?cat_id=$cat_id")) .'" class="nav">'.sprintf($lang['Personal_Gallery_Of_User'], $username)."</a>"; } // ------------------------------------------------------------------------ // check if there is _any_ pictures at all in the personal gallery of this user. // but ONLY if we aren't in simple view mode (then we have already indirectly done the check) // ------------------------------------------------------------------------ if ( ($album_view_mode != ALBUM_VIEW_ALL) && (!empty($allowed_cat)) ) { $sql = 'SELECT COUNT(p.pic_id) AS count FROM '. ALBUM_TABLE .' AS p, ' . ALBUM_CAT_TABLE .' AS c WHERE c.cat_user_id = ' . $album_user_id . ' AND c.cat_id IN (' . $allowed_cat.') AND p.pic_cat_id = c.cat_id'; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not count pics !!', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); $db->sql_freeresult($result); $total_pics = $row['count']; } if ( ($album_config['personal_show_recent_instead_of_nopics'] == 1) && ($row['count'] > 0) ) { album_build_recent_pics($allowed_cat); } else { $template->assign_block_vars('index_pics_block', array()); $template->assign_block_vars('index_pics_block.no_pics', array()); } if ( ($is_root_cat) && (!$has_sub_cats) ) { $sql = "SELECT c.cat_id FROM ". ALBUM_CAT_TABLE ." AS c WHERE c.cat_user_id = '$album_user_id' AND c.cat_parent = 0 LIMIT 1"; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query category information', '', __LINE__, __FILE__, $sql); } if ($db->sql_numrows($result) == 0) { $no_personal_gallery = true; $no_picture_message = sprintf($lang['Personal_gallery_not_created'], $username); $create_personal_cat_link = '<a href="' . append_sid(album_append_uid("album_personal_cat_admin.$phpEx?action=create&user_id=" . $album_user_id)) . '">' . $lang['Create_Personal_Categories'] . '</a><br />'; if ( album_check_permission($auth_data, ALBUM_AUTH_UPLOAD) == true ) { $template->assign_block_vars('index_pics_block.no_pics.manage_personal_gal_folders', array()); } } else { $no_picture_message = $lang['No_Pics']; $create_personal_cat_link = ''; } $db->sql_freeresult($result); } else { $no_picture_message = $lang['No_Pics']; } } else { album_build_picture_table($album_user_id, $cat_ids, $thiscat, $auth_data, $start, $sort_method, $sort_order, $total_pics); if ($album_config['personal_show_recent_in_subcats'] == 1 && $album_view_mode != ALBUM_VIEW_ALL) { album_build_recent_pics($allowed_cat); } } // ------------------------------------------------------------------------ // Check if we should show the upload picture image/icon // ------------------------------------------------------------------------ $upload_img = $images['upload_pic']; $upload_link = append_sid(album_append_uid("album_upload.$phpEx?cat_id=" . intval($cat_id))); $upload_full_link = '<a href="' . $upload_link . '"><img src="' . $upload_img .'" border="0" alt="' . $lang['Upload_Pic'] . '" title="' . $lang['Upload_Pic'] . '" align="middle" /></a>'; $download_img = $images['download_pic']; $download_link = append_sid(album_append_uid('album_download.' . $phpEx . '?cat_id=' . intval($cat_id) . ( ($sort_method != '') ? '&sort_method=' . $sort_method : '' ) . ( ($sort_order != '') ? '&sort_order=' . $sort_order : '' ) . ( ($start != '') ? '&start=' . $start : '' ))); $download_full_link = '<a href="' . $download_link . '"><img src="' . $download_img . '" border="0" alt="' . $lang['Download_page'] . '" title="' . $lang['Download_page'] . '" align="middle" /></a>'; if( ((album_check_permission($auth_data, ALBUM_AUTH_UPLOAD) == true) && ($enable_picture_upload_switch == false)) || ($no_personal_gallery = false) ) { $template->assign_block_vars('enable_picture_upload_pg', array()); } // Enable download only for own personal galleries //if ( ($total_pics > 0) && ($enable_picture_download_switch == false) && ($thiscat['cat_user_id'] == $userdata['user_id']) ) if ( ($total_pics > 0) && ($enable_picture_download_switch == false) ) { $template->assign_block_vars('enable_picture_download_pg', array()); } if ($no_personal_gallery == false) { $auth_data = album_permissions($album_user_id, $cat_id, ALBUM_AUTH_ALL, $thiscat); $auth_list = album_build_auth_list($album_user_id, $cat_id); //if( (album_check_permission($auth_data, ALBUM_AUTH_MANAGE_PERSONAL_CATEGORIES) == true) && ($is_root_cat) && (!$has_sub_cats && !$has_parent_cats)) if( (album_check_permission($auth_data, ALBUM_AUTH_MANAGE_PERSONAL_CATEGORIES) == true) && ((($is_root_cat) && ($row['count'] > 0)) || (!$is_root_cat))) { $template->assign_block_vars('manage_personal_gal_folders', array()); } } // ------------------------------------------------------------------------ // Check if we should show the view toggle button // ------------------------------------------------------------------------ if ($album_config['show_all_in_personal_gallery'] == 1) { $template->assign_block_vars('enable_view_toggle', array()); } if ($thiscat['cat_user_id'] == $userdata['user_id']) { $template->assign_block_vars('switch_own_gallery', array()); } $template->assign_block_vars('personal_gallery_header', array()); // ------------------------------------------------------------------------ // Do our template info... // ------------------------------------------------------------------------ $template->assign_vars(array( 'L_ALBUM' => $lang['Album'], 'U_VIEW_CAT' => append_sid(album_append_uid("$album_page_url?cat_id=" . intval($cat_id))), 'CAT_TITLE' => ($is_root_cat || $album_view_mode == ALBUM_VIEW_ALL) ? sprintf($lang['Personal_Gallery_Of_User'], $username) : $thiscat['cat_title'], 'ALBUM_NAVIGATION_ARROW' => ALBUM_NAV_ARROW, 'NAV_CAT_DESC' => $album_nav_cat_desc, 'L_PERSONAL_GALLERY_EXPLAIN' => $lang['Personal_Gallery_Explain'], 'L_MODERATORS' => $lang['Moderators'], 'MODERATORS' => $moderators_list, 'L_ALBUM_ALLPICS' => $lang['All_Picture_List_Of_User'], 'L_ALBUM_OTF' => $lang['Pic_Gallery'], 'U_ALBUM_ALLPICS' => append_sid(album_append_uid('album_allpics.' . $phpEx)), 'U_ALBUM_OTF' => append_sid(album_append_uid('album_otf.' . $phpEx)), 'L_UPLOAD_PIC' => $lang['Upload_Pic'], 'U_UPLOAD_PIC' => $upload_link, 'UPLOAD_PIC_IMG' => $upload_img, 'UPLOAD_FULL_LINK' => $upload_full_link, 'L_DOWNLOAD_PICS' => $lang['Download_pics'], 'L_DOWNLOAD_PAGE' => $lang['Download_page'], 'U_DOWNLOAD' => $download_link, 'DOWNLOAD_PIC_IMG' => $download_img, 'DOWNLOAD_FULL_LINK' => $download_full_link, //'L_CREATE_PERSONAL_GALLERY' => $lang['Create_Personal_Categories'], 'U_CREATE_PERSONAL_GALLERY' => $create_personal_cat_link, 'CREATE_CATEGORY_IMG' => $images['manage_pic'], 'U_MANAGE_PIC' => append_sid(album_append_uid("album_personal_cat_admin.$phpEx?cat_id=$cat_id")), 'MANAGE_PIC_IMG' => $images['manage_pic'], 'L_MANAGE_PIC' => $lang['manage_Pic'], 'U_TOGGLE_VIEW_ALL' => $view_mode_url, 'TOGGLE_VIEW_ALL_IMG' => $image_toggle_button, 'L_TOGGLE_VIEW_ALL' => $view_mode_text, 'L_CATEGORY' => sprintf($lang['Personal_Gallery_Of_User'], $username), 'L_NO_PICS' => $no_picture_message, 'L_PERSONAL_GALLERY_NOT_CREATED' => sprintf($lang['Personal_gallery_not_created'], $username), 'L_RECENT_PUBLIC_PICS' => sprintf($lang['Recent_Personal_Pics'], $username), 'S_COLS' => $album_config['cols_per_page'], 'S_COL_WIDTH' => (100/$album_config['cols_per_page']) . '%', 'L_VIEW' => $lang['View'], 'L_PIC_CAT' => $lang['Pic_Cat'], 'L_POSTER' => $lang['Pic_Poster'], 'L_POSTED' => $lang['Posted'], 'ALBUM_JUMPBOX' => $album_jumpbox, 'S_ALBUM_ACTION' => append_sid(album_append_uid("$album_page_url?cat_id=" . intval($cat_id))), 'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '', 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_ORDER' => $lang['Order'], 'L_SORT' => $lang['Sort'], 'L_TIME' => $lang['Time'], 'L_PIC_ID' => $lang['Pic_ID'], 'L_PIC_TITLE' => $lang['Pic_Image'], 'SORT_TIME' => ($sort_method == 'pic_time') ? 'selected="selected"' : '', 'SORT_PIC_TITLE' => ($sort_method == 'pic_title') ? 'selected="selected"' : '', 'SORT_VIEW' => ($sort_method == 'pic_view_count') ? 'selected="selected"' : '', 'SORT_RATING_OPTION' => $sort_rating_option, 'SORT_COMMENTS_OPTION' => $sort_comments_option, 'SORT_NEW_COMMENT_OPTION' => $sort_new_comment_option, 'SORT_USERNAME_OPTION' => $sort_username_option, 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], 'SORT_ASC' => ($sort_order == 'ASC') ? 'selected="selected"' : '', 'SORT_DESC' => ($sort_order == 'DESC') ? 'selected="selected"' : '', 'S_AUTH_LIST' => $auth_list ) ); ?> --- NEW FILE: album_memberlist.php --- <?php /*************************************************************************** * album_memberlist.php * ------------------------------------------------ * begin : Friday, August 14, 2004 * copyright : (C) 2004 IdleVoid * email : idl...@sl... * file version : 1.0.1 * release : 1.3.0 ****************************************************************************/ /*************************************************************************** * * 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. * ***************************************************************************/ if ( !defined('IN_PORTAL') ) { die('Hacking attempt'); } // ------------------------------------------------------------------------ // $album_user_id, $cat_id and $moderators_list are as default set // in album.php file in the main folder. // ------------------------------------------------------------------------ // ------------------------------------------------------------------------ // Get the name of this user // ------------------------------------------------------------------------ $username = album_get_user_name($album_user_id); if (empty($username)) { mx_message_die(GENERAL_MESSAGE, $lang['No_user_id_specified']); } // ------------------------------------ // Build the thumbnail page // ------------------------------------ if (isset ($_POST['type'])) { $album_view_type = $_POST['type']; } elseif (isset ($_GET['type'])) { $album_view_type = $_GET['type']; } if( isset($_GET['start']) ) { $start = intval($_GET['start']); } elseif( isset($_POST['start']) ) { $start = intval($_POST['start']); } else { $start = 0; } $pics_per_page = $album_config['rows_per_page'] * $album_config['cols_per_page']; $limit_sql = ($start == 0) ? $pics_per_page : $start .','. $pics_per_page; // set some initial values... // $allowed_cat is set in album.php !!! $list_sql = ''; $count_sql = ''; //$album_view_type = ALBUM_LISTTYPE_PICTURES; switch (strtolower($album_view_type)) { case ALBUM_LISTTYPE_RATINGS: $album_view_type = ALBUM_LISTTYPE_RATINGS; // default sorting if not specified directly if ( !isset($_GET['sort_method']) && !isset($_POST['sort_method']) ) { $sort_method = 'rating'; $sort_order = 'ASC'; } $count_sql = 'SELECT COUNT(rate_pic_id) AS count FROM '. ALBUM_RATE_TABLE .', '. ALBUM_TABLE .', '.ALBUM_CAT_TABLE .' WHERE rate_user_id = '. $album_user_id .' AND cat_id IN (' . $allowed_cat .') AND pic_id = rate_pic_id AND pic_cat_id = cat_id'; $list_sql = "SELECT DISTINCT(p.pic_id), ct.cat_user_id, ct.cat_id, ct.cat_title, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_time, p.pic_view_count, p.pic_lock, r.rate_pic_id, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment FROM ".ALBUM_RATE_TABLE." AS r LEFT JOIN ".ALBUM_TABLE. " AS p ON p.pic_id = r.rate_pic_id LEFT JOIN ".ALBUM_COMMENT_TABLE." AS c ON p.pic_id = c.comment_pic_id LEFT JOIN ".ALBUM_CAT_TABLE." AS ct ON p.pic_cat_id = ct.cat_id WHERE r.rate_user_id = $album_user_id AND ct.cat_id IN ($allowed_cat) GROUP BY r.rate_pic_id ORDER BY $sort_method $sort_order LIMIT $limit_sql"; break; case ALBUM_LISTTYPE_COMMENTS: $album_view_type = ALBUM_LISTTYPE_COMMENTS; // default sorting if not specified directly if ( !isset($_GET['sort_method']) && !isset($_POST['sort_method']) ) { $sort_method = 'comments'; $sort_order = 'ASC'; } $count_sql = 'SELECT COUNT(comment_id) AS count FROM '. ALBUM_COMMENT_TABLE .', '. ALBUM_CAT_TABLE .' WHERE comment_user_id = '. $album_user_id .' AND cat_id IN (' . $allowed_cat .') AND comment_cat_id = cat_id'; $list_sql = "SELECT DISTINCT(p.pic_id), ct.cat_user_id, ct.cat_id, ct.cat_title, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_time, p.pic_view_count, p.pic_lock, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment, c.comment_pic_id FROM ".ALBUM_COMMENT_TABLE." AS c LEFT JOIN ".ALBUM_TABLE. " AS p ON c.comment_pic_id = p.pic_id LEFT JOIN ".ALBUM_RATE_TABLE." AS r ON p.pic_id = r.rate_pic_id LEFT JOIN ".ALBUM_CAT_TABLE." AS ct ON p.pic_cat_id = ct.cat_id WHERE c.comment_user_id = $album_user_id AND ct.cat_id IN ($allowed_cat) GROUP BY c.comment_pic_id ORDER BY $sort_method $sort_order LIMIT $limit_sql"; break; default: $album_view_type = ALBUM_LISTTYPE_PICTURES; $count_sql = 'SELECT COUNT(pic_id) AS count FROM '. ALBUM_TABLE .', '. ALBUM_CAT_TABLE .' WHERE pic_user_id = '. $album_user_id . ' AND cat_id IN (' . $allowed_cat .') AND pic_cat_id = cat_id'; $list_sql = "SELECT DISTINCT(p.pic_id), ct.cat_user_id, ct.cat_id, ct.cat_title, p.pic_title, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_time, p.pic_view_count, p.pic_lock, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments, MAX(c.comment_id) as new_comment FROM ".ALBUM_TABLE. " AS p LEFT JOIN ".ALBUM_RATE_TABLE." AS r ON p.pic_id = r.rate_pic_id LEFT JOIN ".ALBUM_COMMENT_TABLE." AS c ON p.pic_id = c.comment_pic_id LEFT JOIN ".ALBUM_CAT_TABLE." AS ct ON p.pic_cat_id = ct.cat_id WHERE p.pic_user_id = $album_user_id AND ct.cat_id IN ($allowed_cat) GROUP BY p.pic_id ORDER BY $sort_method $sort_order LIMIT $limit_sql"; } // ------------------------------------ // Count pics, comments or ratings // ------------------------------------ if( !($result = $db->sql_query($count_sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not count ' . $album_view_type. 's', '', __LINE__, __FILE__, $count_sql); } $row = $db->sql_fetchrow($result); $total_pics = $row['count']; // ------------------------------------ // Build up // ------------------------------------ $album_view_mode_param = (!empty($album_view_mode)) ? '&mode=' . $album_view_mode : ''; $album_view_type_param = (!empty($album_view_type)) ? '&type=' . $album_view_type : ''; if ($total_pics > 0 && !empty($allowed_cat)) { if( !($result = $db->sql_query($list_sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not query memberlist information', '', __LINE__, __FILE__, $list_sql); } $picrow = array(); while( $row = $db->sql_fetchrow($result) ) { $picrow[] = $row; } // -------------------------------- // Thumbnails table // -------------------------------- $album_show_pic_url = 'album_showpage.' . $phpEx; $album_rate_pic_url = $album_show_pic_url; $album_comment_pic_url = $album_show_pic_url; for ($i = 0; $i < count($picrow); $i += $album_config['cols_per_page']) { $template->assign_block_vars('picrow', array()); for ($j = $i; $j < ($i + $album_config['cols_per_page']); $j++) { if( $j >= count($picrow) ) { break; } if ( ($album_config['thumbnail_cache'] == true) && ($album_config['quick_thumbs'] == true) ) { $pic_filename = $picrow[$j]['pic_filename']; $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4)); $pic_thumbnail = ( $picrow[$j]['pic_thumbnail'] == '' ) ? md5($pic_filename) . $pic_filetype : $picrow[$j]['pic_thumbnail']; //$pic_thumbnail = ( $picrow[$j]['pic_thumbnail'] == '' ) ? $pic_filename : $picrow[$j]['pic_thumbnail']; $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail; if ( file_exists($pic_thumbnail_fullpath) ) { $thumbnail_file = $pic_thumbnail_fullpath; } } if ($album_config['lb_preview'] == 0) { $pic_preview = ''; } else { $pic_preview = 'onmouseover="showtrail(\''. append_sid(album_append_uid('album_picm.' . $phpEx . '?pic_id=' . $picrow[$j]['pic_id'])) . '\',\'' . addslashes($picrow[$j]['pic_title']) . '\', ' . $album_config['midthumb_width'] . ', ' . $album_config['midthumb_height'] . ')" onmouseout="hidetrail()"'; } $template->assign_block_vars('picrow.piccol', array( 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(album_append_uid('album_pic.' . $phpEx . '?pic_id=' . $picrow[$j]['pic_id'])) : append_sid(album_append_uid($album_show_pic_url . '?pic_id=' . $picrow[$j]['pic_id'])), 'THUMBNAIL' => append_sid(album_append_uid('album_thumbnail.' . $phpEx . '?pic_id=' . $picrow[$j]['pic_id'])), 'PIC_PREVIEW' => $pic_preview, 'DESC' => $picrow[$j]['pic_desc'] ) ); $image_rating = ImageRating($picrow[$j]['rating']); $image_rating_link_style = ($image_rating == $lang['Not_rated']) ? '' : 'style="text-decoration: none;"'; $image_comment = ($picrow[$j]['comments'] == 0) ? $lang['Not_commented'] : $picrow[$j]['comments']; // is a personal category that the picture belongs to AND // is it the main category in the personal gallery ? if ($picrow[$j]['cat_user_id'] != 0 && $picrow[$j]['cat_id'] == album_get_personal_root_id($picrow[$j]['cat_user_id'])) { $album_page_url = "album.$phpEx"; } else { $album_page_url = "album_cat.$phpEx"; } $image_cat_url = append_sid(album_append_uid("$album_page_url?cat_id=". $picrow[$j]['cat_id'] . '&user_id=' . $picrow[$j]['cat_user_id'])); $template->assign_block_vars('picrow.pic_detail', array( 'PIC_ID' => $picrow[$j]['pic_id'], 'TITLE' => $picrow[$j]['pic_title'], 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(album_append_uid("album_pic.$phpEx?pic_id=" . $picrow[$j]['pic_id'])) : append_sid(album_append_uid("$album_show_pic_url?pic_id=" . $picrow[$j]['pic_id'])), 'CATEGORY' => $picrow[$j]['cat_title'], 'U_PIC_CAT' => $image_cat_url, 'TIME' => create_date($board_config['default_dateformat'], $picrow[$j]['pic_time'], $board_config['board_timezone']), 'VIEW' => $picrow[$j]['pic_view_count'], 'RATING' => ($album_config['rate'] == 1) ?( $lang['Rating'] . ' : <a href="'. append_sid(album_append_uid($album_rate_pic_url .'?pic_id='. $picrow[$j]['pic_id'])) . '" ' . $image_rating_link_style .'>' . $image_rating . '</a><br />') : '', 'COMMENTS' => ($album_config['comment'] == 1) ? ($lang['Comments'] . ' : <a href="'. append_sid(album_append_uid($album_comment_pic_url .'?pic_id='. $picrow[$j]['pic_id'])) . '">' . $image_comment . '</a><br />') : '', 'EDIT' => ( ($userdata['user_level'] == ADMIN) or ($userdata['user_id'] == $picrow[$j]['pic_user_id']) ) ? '<a href="'. append_sid(album_append_uid("album_edit.$phpEx?pic_id=". $picrow[$j]['pic_id'])) . '">' . $lang['Edit_pic'] . '</a>' : '', 'DELETE' => ( ($userdata['user_level'] == ADMIN) or ($userdata['user_id'] == $picrow[$j]['pic_user_id']) ) ? '<a href="'. append_sid(album_append_uid("album_delete.$phpEx?pic_id=". $picrow[$j]['pic_id'])) . '">' . $lang['Delete_pic'] . '</a>' : '', 'LOCK' => ($userdata['user_level'] == ADMIN) ? '<a href="'. append_sid(album_append_uid("album_modcp.$phpEx?mode=lock&pic_id=". $picrow[$j]['pic_id'])) . '">' . $lang['Lock'] . '</a>' : '', 'MOVE' => ($userdata['user_level'] == ADMIN) ? '<a href="'. append_sid(album_append_uid("album_modcp.$phpEx?mode=move&pic_id=". $picrow[$j]['pic_id'])) . '">' . $lang['Move'] . '</a>' : '', 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://whois.sc/' . decode_ip($picrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($picrow[$j]['pic_user_ip']) .'</a><br />' : '' ) ); } } // -------------------------------- // Pagination // -------------------------------- $template->assign_vars(array( 'PAGINATION' => generate_pagination(append_sid(album_append_uid("album.$phpEx?user_id=$album_user_id&sort_method=$sort_method&sort_order=$sort_order$album_view_mode_param$album_view_type_param")), $total_pics, $pics_per_page, $start), 'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $pics_per_page ) + 1 ), ceil( $total_pics / $pics_per_page )) ) ); } else { $template->assign_block_vars('no_pics', array()); } /* +---------------------------------------------------------- | Main page... +---------------------------------------------------------- */ // ------------------------------------ // additional sorting options // ------------------------------------ $sort_rating_option = ''; $sort_comments_option = ''; if( $album_config['rate'] == 1 ) { $sort_rating_option = '<option value="rating" '; $sort_rating_option .= ($sort_method == 'rating') ? 'selected="selected"' : ''; $sort_rating_option .= '>' . $lang['Rating'] .'</option>'; } if( $album_config['comment'] == 1 ) { $sort_comments_option = '<option value="comments" '; $sort_comments_option .= ($sort_method == 'comments') ? 'selected="selected"' : ''; $sort_comments_option .= '>' . $lang['Comments'] .'</option>'; $sort_new_comment_option = '<option value="new_comment" '; $sort_new_comment_option .= ($sort_method == 'new_comment') ? 'selected="selected"' : ''; $sort_new_comment_option .= '>' . $lang['New_Comment'] .'</option>'; } // // Start output of page // $page_title = $lang['Album']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'body' => 'album_memberlist_body.tpl') ); switch (strtolower($album_view_type)) { case 'comment': $template->assign_block_vars('switch_show_all_pics', array()); $template->assign_block_vars('switch_show_all_ratings', array()); $list_title = sprintf($lang['Comment_List_Of_User'], $username); break; case 'rating': $template->assign_block_vars('switch_show_all_pics', array()); $template->assign_block_vars('switch_show_all_comments', array()); $list_title = sprintf($lang['Rating_List_Of_User'], $username); break; default: $template->assign_block_vars('switch_show_all_ratings', array()); $template->assign_block_vars('switch_show_all_comments', array()); $list_title = sprintf($lang['Picture_List_Of_User'], $username); } $template->assign_block_vars('switch_show_album_search', array()); $template->assign_vars(array( 'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '', 'S_COLS' => $album_config['cols_per_page'], 'S_COL_WIDTH' => (100/$album_config['cols_per_page']) . '%', 'L_NO_PICTURES_BY_USER' => $lang['No_Pics'], 'U_MEMBERLIST_GALLERY' => append_sid(album_append_uid("album.$phpEx?user_id=$album_user_id&mode=$album_view_mode&type=$album_view_type")), 'L_MEMBERLIST_GALLERY_EXPLAIN' => $lang['Member_Picture_List_Explain'], 'U_SHOW_ALL_PICS' => append_sid(album_append_uid("album.$phpEx?user_id=$album_user_id$album_view_mode_param&type=pic")), 'L_SHOW_ALL_PICS' => sprintf($lang['Show_All_Pictures_Of_user'], $username), 'SHOW_ALL_PICS_IMG' => $images['show_all_pics'], 'U_SHOW_ALL_RATINGS' => append_sid(album_append_uid("album.$phpEx?user_id=$album_user_id$album_view_mode_param&type=rating")), 'L_SHOW_ALL_RATINGS' => sprintf($lang['Show_All_Ratings_Of_user'], $username), 'SHOW_ALL_RATINGS_IMG' => $images['show_all_ratings'], 'U_SHOW_ALL_COMMENTS' => append_sid(album_append_uid("album.$phpEx?user_id=$album_user_id$album_view_mode_param&type=comment")), 'L_SHOW_ALL_COMMENTS' => sprintf($lang['Show_All_Comments_Of_user'], $username), 'SHOW_ALL_COMMENTS_IMG' => $images['show_all_comments'], 'L_PICTURES_OF_USER' => $list_title, 'L_PIC_ID' => $lang['Pic_ID'], 'L_PIC_TITLE' => $lang['Pic_Image'], 'L_PIC_CAT' => $lang['Pic_Cat'], 'L_POSTED' => $lang['Posted'], 'L_VIEW' => $lang['View'], 'L_TIME' => $lang['Time'], 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], 'L_ORDER' => $lang['Order'], 'L_SORT' => $lang['Sort'], 'SORT_TIME' => ($sort_method == 'pic_time') ? 'selected="selected"' : '', 'SORT_PIC_TITLE' => ($sort_method == 'pic_title') ? 'selected="selected"' : '', 'SORT_VIEW' => ($sort_method == 'pic_view_count') ? 'selected="selected"' : '', 'SORT_RATING_OPTION' => $sort_rating_option, 'SORT_COMMENTS_OPTION' => $sort_comments_option, 'SORT_NEW_COMMENT_OPTION' => $sort_new_comment_option, 'L_ASC' => $lang['Sort_Ascending'], 'L_DESC' => $lang['Sort_Descending'], 'SORT_ASC' => ($sort_order == 'ASC') ? 'selected="selected"' : '', 'SORT_DESC' => ($sort_order == 'DESC') ? 'selected="selected"' : '') ); // Generate the page $template->pparse('body'); if ( !$is_block ) { include($mx_root_path . 'includes/page_tail.'.$phpEx); } ?> |
|
From: Florin C B. <ory...@us...> - 2011-01-07 17:14:14
|
Update of /cvsroot/mxbb/mx_smartor/album_mod/includes In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv7864/includes Modified Files: album_constants.php Log Message: fixed old readfile by replacing with full GD functions Index: album_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/includes/album_constants.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** album_constants.php 23 Jul 2010 11:15:17 -0000 1.13 --- album_constants.php 7 Jan 2011 17:14:06 -0000 1.14 *************** *** 177,180 **** --- 177,181 ---- define('ALBUM_WM_CACHE_PATH', $module_root_path . 'album_mod/upload/wm_cache/'); define('ALBUM_WM_FILE', $module_root_path . 'album_mod/mark_fap.png'); + define('ALBUM_NOPIC_PATH', $module_root_path . 'album_mod/'); } *************** *** 189,192 **** --- 190,194 ---- define('ALBUM_WM_CACHE_PATH', $module_root_path . 'upload/wm_cache/'); define('ALBUM_WM_FILE', $module_root_path . 'album_mod/mark_fap.png'); + define('ALBUM_NOPIC_PATH', $module_root_path . 'album_mod/'); } |
|
From: Florin C B. <ory...@us...> - 2011-01-07 17:14:14
|
Update of /cvsroot/mxbb/mx_smartor/album_mod/modules In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv7864/modules Modified Files: album_pic.php album_picm.php album_thumbnail.php Log Message: fixed old readfile by replacing with full GD functions Index: album_pic.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/modules/album_pic.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_pic.php 23 Jul 2010 12:19:18 -0000 1.5 --- album_pic.php 7 Jan 2011 17:14:06 -0000 1.6 *************** *** 69,72 **** --- 69,74 ---- } + @define('ALBUM_NOPIC_PATH', $module_root_path . 'album_mod/'); + // Mighty Gorgon: this code is reserved for generating extra thumbnail size on the fly... $req_thumb_size = $mx_request_vars->request('thumbnail_size', MX_TYPE_NO_TAGS, $album_config['thumbnail_size']); *************** *** 79,86 **** $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4)); $pic_fullpath = ALBUM_UPLOAD_PATH . $pic_filename; $pic_wm_fullpath = ALBUM_WM_CACHE_PATH . 'full_' . $pic_filename; // Mighty Gorgon: this prefix is needed to not overwrite standard thumbnails with the ones generated with the extra size... $pic_wm_prefix = 'mid_' . (($req_thumb_size != $album_config['thumbnail_size']) ? ($req_thumb_size . '_') : '') . md5($pic_id); ! $pic_ext_array = array('gif', 'jpg', 'png'); $pic_title = $thispic['pic_title']; $pic_title_reg = ereg_replace("[^A-Za-z0-9]", "_", $pic_title); --- 81,89 ---- $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4)); $pic_fullpath = ALBUM_UPLOAD_PATH . $pic_filename; + $pic_nopic_fullpath = ALBUM_NOPIC_PATH . 'nopicture.jpg'; $pic_wm_fullpath = ALBUM_WM_CACHE_PATH . 'full_' . $pic_filename; // Mighty Gorgon: this prefix is needed to not overwrite standard thumbnails with the ones generated with the extra size... $pic_wm_prefix = 'mid_' . (($req_thumb_size != $album_config['thumbnail_size']) ? ($req_thumb_size . '_') : '') . md5($pic_id); ! $pic_ext_array = array('gif', 'jpg', 'jpeg', 'png'); $pic_title = $thispic['pic_title']; $pic_title_reg = ereg_replace("[^A-Za-z0-9]", "_", $pic_title); *************** *** 240,267 **** // Okay, now we can send image to the browser // ------------------------------------ ! switch ($pic_filetype) ! { ! case '.gif': ! $file_header = 'Content-type: image/gif'; ! break; ! case '.jpg': ! $file_header = 'Content-type: image/jpeg'; ! break; ! case '.png': ! $file_header = 'Content-type: image/png'; ! break; ! default: ! header('Content-type: image/jpeg'); ! header('Content-Disposition: filename=' . $pic_title_reg . $pic_filetype); ! readfile($images['no_thumbnail']); ! exit; ! break; } if ( (($pic_filetype == '.jpg') || ($pic_filetype == '.png')) && ($apply_wm == false) ) { header($file_header); header('Content-Disposition: filename=' .$pic_title_reg . $pic_filetype); ! readfile($pic_fullpath); exit; } --- 243,293 ---- // Okay, now we can send image to the browser // ------------------------------------ ! switch ($pic_filetype) ! { ! case '.gif': ! $file_header = 'Content-type: image/gif'; ! $read_function = 'imagecreatefromgif'; ! break; ! case '.jpeg': ! case '.jpg': ! case '.pjpeg': ! $file_header = 'Content-type: image/jpeg'; ! $read_function = 'imagecreatefromjpeg'; ! break; ! case '.png': ! $file_header = 'Content-type: image/png'; ! $read_function = 'imagecreatefrompng'; ! break; ! default: ! header('Content-type: image/jpeg'); ! $file_header = 'Content-type: image/jpeg'; ! $read_function = 'imagecreatefromjpeg'; ! } ! ! if (!@file_exists($pic_fullpath)) ! { ! mx_message_die(GENERAL_ERROR, 'error: image file does not exists', '', __LINE__, __FILE__, $pic_fullpath); ! $pic_fullpath = $pic_nopic_fullpath; //!empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $module_root_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'; } + $pic_size = @getimagesize($pic_fullpath); + $pic_width = $pic_size[0]; + $pic_height = $pic_size[1]; + + $thumbnail_width = $pic_width; + $thumbnail_height = $pic_height; + + //$thumbnail = @imagecreatetruecolor($thumbnail_width, $thumbnail_height); + $thumbnail = ($album_config['gd_version'] == 1) ? @imagecreate($thumbnail_width, $thumbnail_height) : @imagecreatetruecolor($thumbnail_width, $thumbnail_height); + + //$resize_function = 'imagecopyresampled'; + $resize_function = ($album_config['gd_version'] == 1) ? 'imagecopyresized' : 'imagecopyresampled'; + + /* if ( (($pic_filetype == '.jpg') || ($pic_filetype == '.png')) && ($apply_wm == false) ) { header($file_header); header('Content-Disposition: filename=' .$pic_title_reg . $pic_filetype); ! readfile($pic_fullpath); exit; } *************** *** 282,285 **** --- 308,336 ---- exit; } + */ + + header($file_header); + + @$resize_function($thumbnail, $read_function($pic_fullpath), 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $pic_width, $pic_height); + + + switch ( $pic_filetype ) + { + case '.gif': + imagegif($thumbnail); + break; + case '.jpeg': + case '.jpg': + case '.pjpeg': + imagejpeg($thumbnail); + break; + case '.png': + imagepng($thumbnail); + break; + default: + return false; + } + + imagedestroy($thumbnail); // Old Thumbnails - BEGIN Index: album_thumbnail.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/modules/album_thumbnail.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** album_thumbnail.php 23 Jul 2010 12:19:18 -0000 1.7 --- album_thumbnail.php 7 Jan 2011 17:14:06 -0000 1.8 *************** *** 69,72 **** --- 69,73 ---- } } + @define('ALBUM_NOPIC_PATH', $module_root_path . 'album_mod/'); // Mighty Gorgon: this code is reserved for generating extra thumbnail size on the fly... *************** *** 85,88 **** --- 86,90 ---- $pic_thumbnail = ($thispic['pic_thumbnail'] == '') ? $pic_thumbnail_new : $thispic['pic_thumbnail']; //$pic_thumbnail = ( $thispic['pic_thumbnail'] == '' ) ? $pic_filename : $thispic['pic_thumbnail']; + $pic_nopic_fullpath = ALBUM_NOPIC_PATH . 'nothumbnail.jpg';; $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail; $pic_thumbnail_new_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail_new; *************** *** 101,117 **** if($pic_size == false) { ! if(empty($images['no_thumbnail']) || file_exists($module_root_path. 'album_mod/nothumbnail.jpg')) ! { ! header('Content-type: image/jpeg'); ! header('Content-Disposition: filename=thumb_' . $pic_title_reg . '.' . $pic_filetype); ! readfile($module_root_path. 'album_mod/nothumbnail.jpg'); ! } ! else ! { ! header('Content-type: image/jpeg'); ! header('Content-Disposition: filename=thumb_' . $pic_title_reg . '.' . $pic_filetype); ! readfile($images['no_thumbnail']); ! } ! exit; } /* --- 103,108 ---- if($pic_size == false) { ! $pic_fullpath = $pic_nopic_fullpath; ! $pic_size = @getimagesize($pic_fullpath); } /* *************** *** 125,136 **** */ } - /* - else - { - $pic_title = substr($pic_filename, 0, strlen($pic_filename) - strlen($pic_filetype) - 1); - $pic_title_reg = ereg_replace("[^A-Za-z0-9]", '_', $pic_title); - $pic_thumbnail = $pic_thumbnail_prefix . '_' . $pic_filename; - } - */ $pic_thumbnail_fullpath = ALBUM_CACHE_PATH . $pic_thumbnail; --- 116,119 ---- *************** *** 252,278 **** switch ($pic_filetype) { ! case '.gif': ! $file_header = 'Content-type: image/gif'; ! break; ! case '.jpg': ! $file_header = 'Content-type: image/jpeg'; ! break; ! case '.png': ! $file_header = 'Content-type: image/png'; ! break; default: ! header('Content-type: image/jpeg'); ! header("Content-Disposition: filename=thumb_" . $pic_title_reg . $pic_filetype); ! readfile(!empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $module_root_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'); ! exit; ! break; } ! if( ($album_config['thumbnail_cache'] == true) && file_exists($pic_thumbnail_fullpath) ) ! { ! header($file_header); ! header("Content-Disposition: filename=thumb_" .$pic_title_reg . $pic_filetype); ! readfile($pic_thumbnail_fullpath); ! exit; } --- 235,263 ---- switch ($pic_filetype) { ! case '.gif': ! $file_header = 'Content-type: image/gif'; ! $read_function = 'imagecreatefromgif'; ! break; ! case '.jpeg': ! case '.jpg': ! case '.pjpeg': ! $file_header = 'Content-type: image/jpeg'; ! $read_function = 'imagecreatefromjpeg'; ! break; ! case '.png': ! $file_header = 'Content-type: image/png'; ! $read_function = 'imagecreatefrompng'; ! break; default: ! header('Content-type: image/jpeg'); ! $file_header = 'Content-type: image/jpeg'; ! $read_function = 'imagecreatefromjpeg'; ! //readfile(!empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $module_root_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'); } ! if (!@file_exists($pic_fullpath)) ! { ! //mx_message_die(GENERAL_ERROR, 'error: image file does not exists', '', __LINE__, __FILE__, $pic_fullpath); ! $pic_fullpath = $pic_nopic_fullpath; //!empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $module_root_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'; } *************** *** 281,291 **** $pic_height = $pic_size[1]; if( ($pic_width < $album_config['thumbnail_size']) && ($pic_height < $album_config['thumbnail_size']) ) { ! header($file_header); ! header("Content-Disposition: filename=thumb_" .$pic_title_reg . $pic_filetype); ! readfile($pic_fullpath); ! exit; } else { --- 266,322 ---- $pic_height = $pic_size[1]; + if ($pic_width > $pic_height) + { + $thumbnail_width = $album_config['thumbnail_size']; + $thumbnail_height = $album_config['thumbnail_size'] * ($pic_height / $pic_width); + } + else + { + $thumbnail_height = $album_config['thumbnail_size']; + $thumbnail_width = $album_config['thumbnail_size'] * ($pic_width / $pic_height); + } + + header($file_header); + + //$thumbnail = @imagecreatetruecolor($thumbnail_width, $thumbnail_height); + $thumbnail = ($album_config['gd_version'] == 1) ? @imagecreate($thumbnail_width, $thumbnail_height) : @imagecreatetruecolor($thumbnail_width, $thumbnail_height); + + //$resize_function = 'imagecopyresampled'; + $resize_function = ($album_config['gd_version'] == 1) ? 'imagecopyresized' : 'imagecopyresampled'; + + $source = false; + + if( ($album_config['thumbnail_cache'] == true) && file_exists($pic_thumbnail_fullpath) ) + { + $source = $read_function($pic_thumbnail_fullpath); + } + if( ($pic_width < $album_config['thumbnail_size']) && ($pic_height < $album_config['thumbnail_size']) ) { ! $source = $read_function($pic_fullpath); } + + if( @file_exists($source) ) + { + @$resize_function($thumbnail, $source, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $pic_width, $pic_height); + + switch ($pic_filetype) + { + case '.gif': + imagegif($thumbnail); + break; + case '.jpeg': + case '.jpg': + case '.pjpeg': + imagejpeg($thumbnail); + break; + case '.png': + imagepng($thumbnail); + break; + default: + return false; + } + imagedestroy($thumbnail); + } else { *************** *** 314,318 **** header('Content-type: image/jpeg'); header("Content-Disposition: filename=thumb_" . $pic_title_reg . $pic_filetype); ! readfile(!empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $mx_module_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'); exit; break; --- 345,349 ---- header('Content-type: image/jpeg'); header("Content-Disposition: filename=thumb_" . $pic_title_reg . $pic_filetype); ! readfile($pic_nopic_fullpath); exit; break; *************** *** 375,379 **** header('Content-type: image/jpeg'); header("Content-Disposition: filename=thumb_" . $pic_title_reg . $pic_filetype); ! readfile(!empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $mx_module_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'); break; } --- 406,410 ---- header('Content-type: image/jpeg'); header("Content-Disposition: filename=thumb_" . $pic_title_reg . $pic_filetype); ! readfile($pic_nopic_fullpath); break; } *************** *** 406,413 **** --- 437,446 ---- { $Image->SendToFileJPG($pic_thumbnail_new_fullpath, $album_config['thumbnail_quality']); + @chmod($pic_thumbnail_new_fullpath, 0777); } else { $Image->SendToFile($pic_thumbnail_new_fullpath, $album_config['thumbnail_quality']); + @chmod($pic_thumbnail_new_fullpath, 0777); } //$Image->SendToFile($pic_thumbnail_fullpath, $album_config['thumbnail_quality']); *************** *** 442,446 **** header('Content-type: image/jpeg'); header("Content-Disposition: filename=thumb_" . $pic_title_reg . $pic_filetype); ! readfile(!empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $module_root_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'); exit; } --- 475,483 ---- header('Content-type: image/jpeg'); header("Content-Disposition: filename=thumb_" . $pic_title_reg . $pic_filetype); ! if ( @readfile($pic_nopic_fullpath) == false ) ! { ! $thumbnail = ($album_config['gd_version'] == 1) ? @imagecreate($thumbnail_width, $thumbnail_height) : @imagecreatetruecolor($thumbnail_width, $thumbnail_height); ! @imagejpeg($thumbnail, $pic_nopic_fullpath, $album_config['thumbnail_quality']); ! } exit; } Index: album_picm.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_mod/modules/album_picm.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** album_picm.php 8 Jan 2009 20:43:41 -0000 1.5 --- album_picm.php 7 Jan 2011 17:14:06 -0000 1.6 *************** *** 66,69 **** --- 66,70 ---- } + @define('ALBUM_NOPIC_PATH', $module_root_path . 'album_mod/'); $cat_id = $thispic['pic_cat_id']; $user_id = $thispic['pic_user_id']; *************** *** 75,78 **** --- 76,80 ---- $pic_filetype = strtolower(substr($pic_filename, strlen($pic_filename) - 4, 4)); $pic_fullpath = ALBUM_UPLOAD_PATH . $pic_filename; + $pic_nopic_fullpath = ALBUM_NOPIC_PATH . 'nopicture.jpg'; $pic_wm_fullpath = ALBUM_WM_CACHE_PATH . 'full_' . $pic_filename; $pic_med_fullpath = ALBUM_MED_CACHE_PATH . $pic_thumbnail; *************** *** 224,254 **** } - header($file_header); - $pic_size = @getimagesize($pic_fullpath); $pic_width = $pic_size[0]; $pic_height = $pic_size[1]; ! ! if ($pic_width > $pic_height) { ! $thumbnail_width = $thumbnail_size; ! $thumbnail_height = $thumbnail_size * ($pic_height / $pic_width); } else { ! $thumbnail_height = $thumbnail_size; ! $thumbnail_width = $thumbnail_size * ($pic_width / $pic_height); ! } ! ! $thumbnail = @imagecreatetruecolor($thumbnail_width, $thumbnail_height); $resize_function = 'imagecopyresampled'; ! $source = $read_function($pic_fullpath); ! @$resize_function($thumbnail, $source, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $pic_width, $pic_height); ! ! switch ($pic_filetype) { --- 226,255 ---- } $pic_size = @getimagesize($pic_fullpath); $pic_width = $pic_size[0]; $pic_height = $pic_size[1]; ! if ($pic_width > $pic_height) { ! $thumbnail_width = $album_sp_config['midthumb_width']; ! $thumbnail_height = $album_sp_config['midthumb_width'] * ($pic_height/$pic_width); } else { ! $thumbnail_height = $album_sp_config['midthumb_height']; ! $thumbnail_width = $album_sp_config['midthumb_height'] * ($pic_width/$pic_height); ! } + header($file_header); + + //$thumbnail = @imagecreatetruecolor($thumbnail_width, $thumbnail_height); + $thumbnail = ($album_config['gd_version'] == 1) ? @imagecreate($thumbnail_width, $thumbnail_height) : @imagecreatetruecolor($thumbnail_width, $thumbnail_height); + $resize_function = 'imagecopyresampled'; ! $source = $read_function($pic_fullpath); ! @$resize_function($thumbnail, $source, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $pic_width, $pic_height); ! switch ($pic_filetype) { *************** *** 272,277 **** } ! header('Content-type: image/jpeg'); ! readfile($images['no_thumbnail']); exit; } --- 273,278 ---- } ! //header('Content-type: image/jpeg'); ! //readfile($images['no_thumbnail']); exit; } *************** *** 286,323 **** switch ($pic_filetype) { ! case '.gif': ! $file_header = 'Content-type: image/gif'; ! break; ! case '.jpg': ! $file_header = 'Content-type: image/jpeg'; ! break; ! case '.png': ! $file_header = 'Content-type: image/png'; ! break; default: ! header('Content-type: image/jpeg'); ! header('Content-Disposition: filename=' . $pic_title_reg . $pic_filetype); ! readfile($images['no_thumbnail']); ! exit; ! break; } if ( (($pic_filetype == '.jpg') || ($pic_filetype == '.png')) && ($apply_wm == false) ) { ! header($file_header); ! header('Content-Disposition: filename=' .$pic_title_reg . $pic_filetype); ! readfile($pic_med_fullpath); ! exit; } if ( $pic_filetype == '.gif' ) { ! header($file_header); ! header('Content-Disposition: filename=' . $pic_title_reg . $pic_filetype); ! readfile($pic_med_fullpath); ! exit; } ! readfile($pic_med_fullpath); exit; } --- 287,380 ---- switch ($pic_filetype) { ! case '.gif': ! $file_header = 'Content-type: image/gif'; ! $read_function = 'imagecreatefromgif'; ! break; ! case '.jpeg': ! case '.jpg': ! case '.pjpeg': ! $file_header = 'Content-type: image/jpeg'; ! $read_function = 'imagecreatefromjpeg'; ! break; ! case '.png': ! $file_header = 'Content-type: image/png'; ! $read_function = 'imagecreatefrompng'; ! break; default: ! header('Content-type: image/jpeg'); ! $file_header = 'Content-type: image/jpeg'; ! $read_function = 'imagecreatefromjpeg'; ! //readfile(!empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $module_root_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'); ! } ! ! $pic_fullpath = ALBUM_UPLOAD_PATH . $pic_filename; ! ! if (!@file_exists($pic_fullpath)) ! { ! //mx_message_die(GENERAL_ERROR, 'error: image file does not exists', '', __LINE__, __FILE__, $pic_fullpath); ! $pic_fullpath = !empty($images['no_thumbnail']) ? $images['no_thumbnail'] : $module_root_path . 'templates/'. $theme['template_name'] . '/images/nothumbnail.jpg'; } + header($file_header); + + // -------------------------------- + // Try to read pic size from uloaded file! + // -------------------------------- + $pic_size = @getimagesize($pic_fullpath); + $pic_width = $pic_size[0]; + $pic_height = $pic_size[1]; + + if ($pic_width > $pic_height) + { + $thumbnail_width = $album_sp_config['midthumb_width']; + $thumbnail_height = $album_sp_config['midthumb_width'] * ($pic_height/$pic_width); + } + else + { + $thumbnail_height = $album_sp_config['midthumb_height']; + $thumbnail_width = $album_sp_config['midthumb_height'] * ($pic_width/$pic_height); + } + + //$thumbnail = @imagecreatetruecolor($thumbnail_width, $thumbnail_height); + $thumbnail = ($album_config['gd_version'] == 1) ? @imagecreate($thumbnail_width, $thumbnail_height) : @imagecreatetruecolor($thumbnail_width, $thumbnail_height); + + //$resize_function = 'imagecopyresampled'; + $resize_function = ($album_config['gd_version'] == 1) ? 'imagecopyresized' : 'imagecopyresampled'; + + $source = false; + + /* if ( (($pic_filetype == '.jpg') || ($pic_filetype == '.png')) && ($apply_wm == false) ) { ! $source = $read_function($pic_med_fullpath); } if ( $pic_filetype == '.gif' ) { ! $source = $read_function($pic_med_fullpath); } + */ + + $source = $read_function($pic_med_fullpath); ! @$resize_function($thumbnail, $source, 0, 0, 0, 0, $thumbnail_width, $thumbnail_height, $pic_width, $pic_height); ! ! switch ($pic_filetype) ! { ! case '.gif': ! imagegif($thumbnail); ! break; ! case '.jpeg': ! case '.jpg': ! case '.pjpeg': ! imagejpeg($thumbnail); ! break; ! case '.png': ! imagepng($thumbnail); ! break; ! default: ! return false; ! } ! imagedestroy($thumbnail); exit; } *************** *** 327,334 **** // Hmm, cache is empty. Try to re-generate! // -------------------------------- - $pic_size = @getimagesize(ALBUM_UPLOAD_PATH . $pic_filename); $pic_width = $pic_size[0]; ! $pic_height = $pic_size[1]; $gd_errored = FALSE; --- 384,390 ---- // Hmm, cache is empty. Try to re-generate! // -------------------------------- $pic_size = @getimagesize(ALBUM_UPLOAD_PATH . $pic_filename); $pic_width = $pic_size[0]; ! $pic_height = $pic_size[1]; $gd_errored = FALSE; |
|
From: Florin C B. <ory...@us...> - 2011-01-07 17:13:18
|
Update of /cvsroot/mxbb/mx_smartor/album_mod/includes/fap_not_ported In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv7761/fap_not_ported Log Message: Directory /cvsroot/mxbb/mx_smartor/album_mod/includes/fap_not_ported added to the repository |
|
From: Florin C B. <ory...@us...> - 2011-01-05 00:00:11
|
Update of /cvsroot/mxbb/mx_music/music_box/modules In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv5063 Modified Files: music_cat.php music_page.php Log Message: Index: music_page.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_page.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** music_page.php 21 Aug 2010 00:28:12 -0000 1.15 --- music_page.php 5 Jan 2011 00:00:03 -0000 1.16 *************** *** 313,316 **** --- 313,330 ---- $url_video = $music_root_path . 'mediaplayer.swf'; } + else if (($song_filetype == 'mp4') || (str_replace('rtmp://', 'rtmp://', $song_url))) + { + /* + if ( !is_object($mx_page) ) + { + $mx_page = new mx_page(); + } + $mx_page->add_footer_text( $music_root_path . 'music_player.js', true ); + */ + + $template->assign_block_vars('flv', array()); + $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); + $url_video = $music_root_path . 'mediaplayer.swf'; + } else if ( ( $song_filetype == 'mod' ) ) { Index: music_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_music/music_box/modules/music_cat.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** music_cat.php 10 Sep 2008 13:55:49 -0000 1.14 --- music_cat.php 5 Jan 2011 00:00:03 -0000 1.15 *************** *** 826,829 **** --- 826,834 ---- $url_player = ''; + $host = ''; + $host_protocol = ''; + + //$host = explode("//", $thissong['song_url']); + //$host_protocol = $host[0] . '//'; // *************** *** 913,916 **** --- 918,931 ---- )); } + else if( ( ($song_filetype == 'mp4') && !empty($thissong['song_url']) ) || str_replace('rtmp://', 'rtmp://', $song_url) ) + { + //$host = explode("//", $thissong['song_url']); + //$host_protocol = $host[0] . '//'; + $template->assign_block_vars('songrow.flv', array()); + $url_download = mx_append_sid(this_mo_mxurl("music_mode=music_download&song_id=$song_id")); + $url_video = $music_root_path . 'mediaplayer.swf'; + $mime_type= 'audio/x-mpeg'; //application/x-mplayer2 + $row_type = 'flv'; + } else if( ($song_filetype == 'pls') && !empty($thissong['song_url']) ) { |
|
From: Florin C B. <ory...@us...> - 2010-10-11 23:00:21
|
Update of /cvsroot/mxbb/core/install/includes In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv31295 Modified Files: functions_install.php Log Message: Index: functions_install.php =================================================================== RCS file: /cvsroot/mxbb/core/install/includes/functions_install.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** functions_install.php 30 Sep 2008 07:04:45 -0000 1.20 --- functions_install.php 11 Oct 2010 23:00:13 -0000 1.21 *************** *** 909,913 **** // Get the full phpBB URL by reading its config table. // ! function get_phpbb_url($table_prefix, $portal_backend) { global $mx_root_path, $phpEx, $db; --- 909,913 ---- // Get the full phpBB URL by reading its config table. // ! function get_phpbb_url($table_prefix, $portal_backend = 'internal') { global $mx_root_path, $phpEx, $db; *************** *** 916,927 **** $sql = 'SELECT config_name, config_value ! FROM ' . $table_prefix . 'config' . $were_sql; ! $result = $db->sql_query($sql); ! while ($row = $db->sql_fetchrow($result)) { $board_config[$row['config_name']] = $row['config_value']; } ! $db->sql_freeresult($result); $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; --- 916,945 ---- $sql = 'SELECT config_name, config_value ! FROM ' . $table_prefix . 'config' ! . $were_sql; ! if ( !($result = $db->sql_query($sql)) ) ! { ! if (!function_exists('mx_message_die')) ! { ! global $db; ! $sql = "SELECT * FROM ".$table_prefix."config"; ! if( !($result = $db->sql_query($sql)) ) ! { ! print("Couldnt query config information, Allso this hosting or server is using a cache optimizer not compatible with MX-Publisher or just lost connection to database wile query."); ! return false; ! } ! } ! else ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt query config information', '', __LINE__, __FILE__, $sql ); ! } ! } ! ! while ( $row = $db->sql_fetchrow($result) ) { $board_config[$row['config_name']] = $row['config_value']; } ! $db->sql_freeresult($result); $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; |
|
From: Florin C B. <ory...@us...> - 2010-10-11 23:00:09
|
Update of /cvsroot/mxbb/core In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv30802 Added Files: config.php.contrib Log Message: --- NEW FILE: config.php.contrib --- <?php /** ------------------------------------------------------------------------ * * $Id: config.php.contrib,v 1.3 2010/10/11 23:00:00 orynider Exp $ * This file must be put into the MX-Publisher Modular System directory, not into the phpBB directory. **/ // // MySql Information ( CHANGE HERE ) // $dbms = 'mysql4'; $dbhost = 'localhost'; $dbname = 'test'; $dbuser = 'root'; $dbpasswd = ''; // // Portal prefix table // $mx_table_prefix = 'mx_'; // // phpBB Prefix table // $table_prefix = 'phpbb_'; // // phpBB acm type for db api // $acm_type = 'file'; // // Portal is Installed // define('MX_INSTALLED', true); // // phpBB Is Intalled // define('PHPBB_INSTALLED', true); ?> |
|
From: Florin C B. <ory...@us...> - 2010-10-11 23:00:09
|
Update of /cvsroot/mxbb/core/includes In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv30802/includes Modified Files: mx_functions_tools.php Added Files: mx_functions_ch.php Log Message: --- NEW FILE: mx_functions_ch.php --- <?php /** * * @package CH * @version $Id: mx_functions_ch.php,v 1.14 2010/10/11 23:00:00 orynider Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * @internal * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } // // This code is part of common.php in Categories Hierarchy 2.1.0 // $starttime = microtime(); $trc_loc_start = $trc_loc_end = 0; // include basic classes def include($phpbb_root_path . 'includes/class_config.' . $phpEx); include($phpbb_root_path . 'includes/class_groups.' . $phpEx); // get config $config = new config_class(); if ( !$config->read() ) { define('RUN_CH_INSTALL', true); } $board_config = $config->data; // let's run the upgrade script if ( !defined('IN_LOGIN') && !defined('IN_INSTALL') && (($config->data['mod_cat_hierarchy'] != CH_CURRENT_VERSION) || defined('RUN_CH_INSTALL')) ) { header('Location: ' . $phpbb_root_path . 'install_cat/install.' . $phpEx . (empty($SID) ? '' : '?' . $SID)); exit; } // user objects include($config->url('includes/class_user')); include($config->url('includes/class_auth')); // instantiate some objects $user = new user(); $censored_words = new words(); $icons = new icons(); $navigation = new navigation(); $themes = ''; $smilies = new smilies(); // People never read achievement messages after after having seen "Succesfull !", tss tss :) if ( file_exists($phpbb_root_path.'install_cat') && !defined('IN_LOGIN') && !defined('IN_INSTALL') ) { message_die(GENERAL_MESSAGE, 'Please ensure the install_cat/ directory is deleted'); } // messages queue $message_queue = ''; @include($config->url('includes/class_message')); $message_queue = !defined('CH_message_queue') ? '' : new message_queue(); // include extra language key $language = $userdata['user_lang']; if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = $board_config['default_lang']; } if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = 'english'; } include($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.' . $phpEx); // include extra language key $language = $userdata['user_lang']; if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = $board_config['default_lang']; } if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.'.$phpEx) ) { $language = 'english'; } include($phpbb_root_path . 'language/lang_' . $language . '/lang_extend_cat_hierarchy.' . $phpEx); ?> Index: mx_functions_tools.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/mx_functions_tools.php,v retrieving revision 1.60 retrieving revision 1.61 diff -C2 -d -r1.60 -r1.61 *** mx_functions_tools.php 6 Jan 2010 19:40:38 -0000 1.60 --- mx_functions_tools.php 11 Oct 2010 23:00:00 -0000 1.61 *************** *** 5510,5516 **** * */ ! function init() { ! } --- 5510,5516 ---- * */ ! function init($item_data, $comments_type = 'internal') { ! return false; } |
|
From: Florin C B. <ory...@us...> - 2010-10-09 20:51:44
|
Update of /cvsroot/mxbb/mx_phpbb In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv2192 Modified Files: mx_phpbb.php Log Message: Index: mx_phpbb.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/mx_phpbb.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** mx_phpbb.php 24 Jan 2009 16:42:45 -0000 1.24 --- mx_phpbb.php 9 Oct 2010 20:51:36 -0000 1.25 *************** *** 35,38 **** --- 35,72 ---- $HTTP_POST_FILES = $_SESSION['mxbb_post_files']; + // + // addslashes to vars if magic_quotes_gpc is off + // this is a security precaution to prevent someone + // trying to break out of a SQL statement. + // If we are on PHP >= 6.0.0 we do not need some code + if (phpversion() >= '6.0.0-dev') + { + /** + * @ignore + */ + } + else if( !get_magic_quotes_gpc() ) + { + if( is_array($HTTP_POST_VARS) ) + { + while( list($k, $v) = each($HTTP_POST_VARS) ) + { + if( is_array($HTTP_POST_VARS[$k]) ) + { + while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) ) + { + $HTTP_POST_VARS[$k][$k2] = addslashes($v2); + } + @reset($HTTP_POST_VARS[$k]); + } + else + { + $HTTP_POST_VARS[$k] = addslashes($v); + } + } + @reset($HTTP_POST_VARS); + } + } + $default_lang = ($mx_user->lang['default_lang']) ? $mx_user->lang['default_lang'] : $board_config['default_lang']; |
|
From: Florin C B. <ory...@us...> - 2010-10-09 07:00:35
|
Update of /cvsroot/mxbb/mx_counter/admin In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv31799 Modified Files: admin_counter_cfg.php Log Message: append mx_append Index: admin_counter_cfg.php =================================================================== RCS file: /cvsroot/mxbb/mx_counter/admin/admin_counter_cfg.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin_counter_cfg.php 8 Feb 2008 23:40:23 -0000 1.2 --- admin_counter_cfg.php 9 Oct 2010 07:00:27 -0000 1.3 *************** *** 136,140 **** $template->assign_vars(array( ! 'S_ACTION' => append_sid("admin_counter_cfg.$phpEx"), 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'L_COUNTER_SETTINGS' => $lang['Counter_Settings'], --- 136,140 ---- $template->assign_vars(array( ! 'S_ACTION' => mx_append_sid("admin_counter_cfg.$phpEx"), 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'L_COUNTER_SETTINGS' => $lang['Counter_Settings'], |
|
From: Florin C B. <ory...@us...> - 2010-09-13 13:17:53
|
Update of /cvsroot/mxbb/core/templates/subSilver In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv27768 Modified Files: subSilver.cfg Log Message: Index: subSilver.cfg =================================================================== RCS file: /cvsroot/mxbb/core/templates/subSilver/subSilver.cfg,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** subSilver.cfg 27 Apr 2008 18:40:25 -0000 1.12 --- subSilver.cfg 13 Sep 2010 13:17:45 -0000 1.13 *************** *** 276,280 **** // Logo // ! $mx_images['mx_logo'] = "$current_template_images/logo.gif";; // --- 276,280 ---- // Logo // ! $mx_images['mx_logo'] = "$current_template_images/logo.gif"; // |
|
From: Florin C B. <ory...@us...> - 2010-09-13 13:17:32
|
Update of /cvsroot/mxbb/core/includes/sessions/phpbb2 In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv27708/phpbb2 Modified Files: session.php Log Message: Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/phpbb2/session.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** session.php 7 Sep 2008 21:35:41 -0000 1.14 --- session.php 13 Sep 2010 13:17:22 -0000 1.15 *************** *** 759,762 **** --- 759,996 ---- /** + * Specify/Get image + // + // phpBB2 Graphics - redefined for mxBB + // - Uncomment and redefine phpBB graphics + // + // If you need to redefine some phpBB graphics, look within the phpBB/templates folder for the template_name.cfg file and + // redefine those $image['xxx'] you want. Note: Many phpBB images are reused all over mxBB (eg see below), thus if you redefine + // common phpBB images, this will have immedaite effect for all mxBB pages. + // + */ + function img($img, $alt = '', $width = false, $suffix = '', $type = 'full_tag') + { + static $imgs; + global $phpbb_root_path, $mx_root_path, $mx_images; + + // + // Load phpBB Template configuration data + // - First try current template + // + if ( file_exists( $phpbb_root_path . $this->current_template_path . "/images" ) ) + { + $current_template_path = $this->current_template_path; + $template_name = $this->template_name; + + @include($phpbb_root_path . $this->current_template_path . '/' . $this->template_name . '.cfg'); + } + + // + // Since we have no current Template Config file, try the cloned template instead + // + if ( file_exists( $phpbb_root_path . $this->cloned_current_template_path . "/images" ) && !defined('TEMPLATE_CONFIG') ) + { + $current_template_path = $this->cloned_current_template_path; + $template_name = $this->cloned_template_name; + + @include($phpbb_root_path . $this->cloned_current_template_path . '/' . $this->cloned_template_name . '.cfg'); + } + + // + // Last attempt, use default template intead + // + if ( file_exists( $phpbb_root_path . $this->default_current_template_path . "/images" ) && !defined('TEMPLATE_CONFIG') ) + { + $current_template_path = $this->default_current_template_path; + $template_name = $this->default_template_name; + + @include($phpbb_root_path . $this->default_current_template_path . '/' . $this->default_template_name . '.cfg'); + } + + $this->img_lang = (file_exists($phpbb_root_path . $current_template_path . $this->lang_name)) ? $this->lang_name : $board_config['default_lang']; + + /* Here we overwrite phpBB images from the template configuration file with images from database */ + + $this->img_array['image_filename'] = array( + 'img_site_logo' => "logo.gif", + 'img_upload_bar' => "upload_bar.gif", + 'img_icon_contact_aim' => "icon_aim.gif", + 'img_icon_contact_email' => "icon_email.gif", + 'img_icon_contact_icq' => "icon_icq_add.gif", + 'img_icon_contact_jabber' => "icon_jabber.gif", + 'img_icon_contact_msnm' => "icon_msnm.gif", + 'img_icon_contact_pm' => "icon_pm.gif", + 'img_icon_contact_yahoo' => "icon_yim.gif", + 'img_icon_contact_www' => "icon_www.gif", + 'img_icon_post_delete' => "icon_delete.gif", + 'img_icon_post_edit' => "icon_edit.gif", + 'img_icon_post_info' => "icon_info.gif", + 'img_icon_post_quote' => "icon_quote.gif", + 'img_icon_post_report' => "icon_report.gif", + 'img_icon_user_online' => "icon_online.gif", + 'img_icon_user_offline' => "icon_offline.gif", + 'img_icon_user_profile' => "icon_profile.gif", + 'img_icon_user_search' => "icon_search.gif", + 'img_icon_user_warn' => "icon_warn.gif", + 'img_button_pm_forward' => "reply.gif", + 'img_button_pm_new' => "msg_newpost.gif", + 'img_button_pm_reply' => "reply.gif", + 'img_button_topic_locked' => "msg_newpost.gif", + 'img_button_topic_new' => "post.gif", + 'img_button_topic_reply' => "reply.gif", + 'img_forum_link' => "forum_link.gif", + 'img_forum_read' => "forum_read.gif", + 'img_forum_read_locked' => "forum_read_locked.gif", + 'img_forum_read_subforum' => "forum_read_subforum.gif", + 'img_forum_unread' => "forum_unread.gif", + 'img_forum_unread_locked' => "forum_unread_locked.gif", + 'img_forum_unread_subforum' => "forum_unread_subforum.gif", + 'img_topic_moved' => "topic_moved.gif", + 'img_topic_read' => "topic_read.gif", + 'img_topic_read_mine' => "topic_read_mine.gif", + 'img_topic_read_hot' => "topic_read_hot.gif", + 'img_topic_read_hot_mine' => "topic_read_hot_mine.gif", + 'img_topic_read_locked' => "topic_read_locked.gif", + 'img_topic_read_locked_mine' => "topic_read_locked_mine.gif", + 'img_topic_unread' => "topic_unread.gif", + 'img_topic_unread_mine' => "topic_unread_mine.gif", + 'img_topic_unread_hot' => "topic_unread_hot.gif", + 'img_topic_unread_hot_mine' => "topic_unread_hot_mine.gif", + 'img_topic_unread_locked' => "topic_unread_locked.gif", + 'img_topic_unread_locked_mine' => "topic_unread_locked_mine.gif", + 'img_sticky_read' => "sticky_read.gif", + 'img_sticky_read_mine' => "sticky_read_mine.gif", + 'img_sticky_read_locked' => "sticky_read_locked.gif", + 'img_sticky_read_locked_mine' => "ticky_read_locked_mine.gif", + 'img_sticky_unread' => "sticky_unread.gif", + 'img_sticky_unread_mine' => "sticky_unread_mine.gif", + 'img_sticky_unread_locked' => "sticky_unread_locked.gif", + 'img_sticky_unread_locked_mine' => "sticky_unread_locked_mine.gif", + 'img_announce_read' => "announce_read.gif", + 'img_announce_read_mine' => "announce_read_mine.gif", + 'img_announce_read_locked' => "announce_read_locked.gif", + 'img_announce_read_locked_mine' => "announce_read_locked_mine.gif", + 'img_announce_unread' => "announce_unread.gif", + 'img_announce_unread_mine' => "announce_unread_mine.gif", + 'img_announce_unread_locked' => "announce_unread_locked.gif", + 'img_announce_unread_locked_mine' => "announce_unread_locked_mine.gif", + 'img_global_read' => "announce_read.gif", + 'img_global_read_mine' => "announce_read_mine.gif", + 'img_global_read_locked' => "announce_read_locked.gif", + 'img_global_read_locked_mine' => "announce_read_locked_mine.gif", + 'img_global_unread' => "announce_unread.gif", + 'img_global_unread_mine' => "announce_unread_mine.gif", + 'img_global_unread_locked' => "announce_unread_locked.gif", + 'img_global_unread_locked_mine' => "announce_unread_locked_mine.gif", + 'img_subforum_read' => "", + 'img_subforum_unread' => "", + 'img_pm_read' => "topic_read.gif", + 'img_pm_unread' => "topic_unread.gif", + 'img_icon_back_top' => "", + 'img_icon_post_target' = "icon_post_target.gif", + 'img_icon_post_target_unread' = "icon_post_target_unread.gif", + 'img_icon_topic_attach' => "icon_topic_attach.gif", + 'img_icon_topic_latest' => "icon_topic_latest.gif", + 'img_icon_topic_newest' => "icon_topic_newest.gif", + 'img_icon_topic_reported' => "icon_topic_reported.gif", + 'img_icon_topic_unapproved' => "icon_topic_unapproved.gif" + ); + + $this->img_array['image_lang'] = array( + 'img_icon_post_edit' => $this->img_lang, + 'img_icon_post_quote' => $this->img_lang, + 'img_button_pm_forward' => $this->img_lang, + 'img_button_pm_new' => $this->img_lang, + 'img_button_pm_reply' => $this->img_lang, + 'img_button_topic_new' => $this->img_lang, + 'img_button_topic_reply' => $this->img_lang + ); + + $img_data = &$imgs[$img]; + + if (empty($img_data)) + { + if (!isset($this->img_array[$img])) + { + // Do not fill the image to let designers decide what to do if the image is empty + $img_data = ''; + return $img_data; + } + + $img_data['src'] = PHPBB_URL . $current_template_path . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename']; + $img_data['width'] = (!empty($width)) ? $width : ''; //$this->img_array[$img]['image_width']; + $img_data['height'] = (!empty($height)) ? $height : ''; //$this->img_array[$img]['image_height']; + } + + $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt; + + switch ($type) + { + case 'src': + return $img_data['src']; + break; + + case 'width': + return ($width === false) ? $img_data['width'] : $width; + break; + + case 'height': + return $img_data['height']; + break; + + default: + $use_width = ($width === false) ? $img_data['width'] : $width; + + return '<img src="' . $img_data['src'] . '"' . (($use_width) ? ' width="' . $use_width . '"' : '') . (($img_data['height']) ? ' height="' . $img_data['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />'; + break; + } + } + + /** + * Get option bit field from user options + */ + function optionget($key, $data = false) + { + if (!isset($this->keyvalues[$key])) + { + $var = ($data) ? $data : $this->data['user_options']; + $this->keyvalues[$key] = ($var & 1 << $this->keyoptions[$key]) ? true : false; + } + + return $this->keyvalues[$key]; + } + + /** + * Set option bit field for user options + */ + function optionset($key, $value, $data = false) + { + $var = ($data) ? $data : $this->data['user_options']; + + if ($value && !($var & 1 << $this->keyoptions[$key])) + { + $var += 1 << $this->keyoptions[$key]; + } + else if (!$value && ($var & 1 << $this->keyoptions[$key])) + { + $var -= 1 << $this->keyoptions[$key]; + } + else + { + return ($data) ? $var : false; + } + + if (!$data) + { + $this->data['user_options'] = $var; + return true; + } + else + { + return $var; + } + } + + /** * encode_lang * |
|
From: Florin C B. <ory...@us...> - 2010-09-13 13:17:30
|
Update of /cvsroot/mxbb/core/includes/sessions/internal In directory sfp-cvsdas-4.v30.ch3.sourceforge.com:/tmp/cvs-serv27708/internal Modified Files: session.php Log Message: Index: session.php =================================================================== RCS file: /cvsroot/mxbb/core/includes/sessions/internal/session.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** session.php 29 Sep 2008 01:00:04 -0000 1.16 --- session.php 13 Sep 2010 13:17:22 -0000 1.17 *************** *** 763,766 **** --- 763,1000 ---- $this->lang = &$lang; } + + /** + * Specify/Get image + // + // phpBB2 Graphics - redefined for mxBB + // - Uncomment and redefine phpBB graphics + // + // If you need to redefine some phpBB graphics, look within the phpBB/templates folder for the template_name.cfg file and + // redefine those $image['xxx'] you want. Note: Many phpBB images are reused all over mxBB (eg see below), thus if you redefine + // common phpBB images, this will have immedaite effect for all mxBB pages. + // + */ + function img($img, $alt = '', $width = false, $suffix = '', $type = 'full_tag') + { + static $imgs; + global $phpbb_root_path, $mx_root_path, $mx_images; + + // + // Load phpBB Template configuration data + // - First try current template + // + if ( file_exists( $phpbb_root_path . $this->current_template_path . "/images" ) ) + { + $current_template_path = $this->current_template_path; + $template_name = $this->template_name; + + @include($phpbb_root_path . $this->current_template_path . '/' . $this->template_name . '.cfg'); + } + + // + // Since we have no current Template Config file, try the cloned template instead + // + if ( file_exists( $phpbb_root_path . $this->cloned_current_template_path . "/images" ) && !defined('TEMPLATE_CONFIG') ) + { + $current_template_path = $this->cloned_current_template_path; + $template_name = $this->cloned_template_name; + + @include($phpbb_root_path . $this->cloned_current_template_path . '/' . $this->cloned_template_name . '.cfg'); + } + + // + // Last attempt, use default template intead + // + if ( file_exists( $phpbb_root_path . $this->default_current_template_path . "/images" ) && !defined('TEMPLATE_CONFIG') ) + { + $current_template_path = $this->default_current_template_path; + $template_name = $this->default_template_name; + + @include($phpbb_root_path . $this->default_current_template_path . '/' . $this->default_template_name . '.cfg'); + } + + $this->img_lang = (file_exists($phpbb_root_path . $current_template_path . $this->lang_name)) ? $this->lang_name : $board_config['default_lang']; + + /* Here we overwrite phpBB images from the template configuration file with images from database */ + + $this->img_array['image_filename'] = array( + 'img_site_logo' => "logo.gif", + 'img_upload_bar' => "upload_bar.gif", + 'img_icon_contact_aim' => "icon_aim.gif", + 'img_icon_contact_email' => "icon_email.gif", + 'img_icon_contact_icq' => "icon_icq_add.gif", + 'img_icon_contact_jabber' => "icon_jabber.gif", + 'img_icon_contact_msnm' => "icon_msnm.gif", + 'img_icon_contact_pm' => "icon_pm.gif", + 'img_icon_contact_yahoo' => "icon_yim.gif", + 'img_icon_contact_www' => "icon_www.gif", + 'img_icon_post_delete' => "icon_delete.gif", + 'img_icon_post_edit' => "icon_edit.gif", + 'img_icon_post_info' => "icon_info.gif", + 'img_icon_post_quote' => "icon_quote.gif", + 'img_icon_post_report' => "icon_report.gif", + 'img_icon_user_online' => "icon_online.gif", + 'img_icon_user_offline' => "icon_offline.gif", + 'img_icon_user_profile' => "icon_profile.gif", + 'img_icon_user_search' => "icon_search.gif", + 'img_icon_user_warn' => "icon_warn.gif", + 'img_button_pm_forward' => "reply.gif", + 'img_button_pm_new' => "msg_newpost.gif", + 'img_button_pm_reply' => "reply.gif", + 'img_button_topic_locked' => "msg_newpost.gif", + 'img_button_topic_new' => "post.gif", + 'img_button_topic_reply' => "reply.gif", + 'img_forum_link' => "forum_link.gif", + 'img_forum_read' => "forum_read.gif", + 'img_forum_read_locked' => "forum_read_locked.gif", + 'img_forum_read_subforum' => "forum_read_subforum.gif", + 'img_forum_unread' => "forum_unread.gif", + 'img_forum_unread_locked' => "forum_unread_locked.gif", + 'img_forum_unread_subforum' => "forum_unread_subforum.gif", + 'img_topic_moved' => "topic_moved.gif", + 'img_topic_read' => "topic_read.gif", + 'img_topic_read_mine' => "topic_read_mine.gif", + 'img_topic_read_hot' => "topic_read_hot.gif", + 'img_topic_read_hot_mine' => "topic_read_hot_mine.gif", + 'img_topic_read_locked' => "topic_read_locked.gif", + 'img_topic_read_locked_mine' => "topic_read_locked_mine.gif", + 'img_topic_unread' => "topic_unread.gif", + 'img_topic_unread_mine' => "topic_unread_mine.gif", + 'img_topic_unread_hot' => "topic_unread_hot.gif", + 'img_topic_unread_hot_mine' => "topic_unread_hot_mine.gif", + 'img_topic_unread_locked' => "topic_unread_locked.gif", + 'img_topic_unread_locked_mine' => "topic_unread_locked_mine.gif", + 'img_sticky_read' => "sticky_read.gif", + 'img_sticky_read_mine' => "sticky_read_mine.gif", + 'img_sticky_read_locked' => "sticky_read_locked.gif", + 'img_sticky_read_locked_mine' => "ticky_read_locked_mine.gif", + 'img_sticky_unread' => "sticky_unread.gif", + 'img_sticky_unread_mine' => "sticky_unread_mine.gif", + 'img_sticky_unread_locked' => "sticky_unread_locked.gif", + 'img_sticky_unread_locked_mine' => "sticky_unread_locked_mine.gif", + 'img_announce_read' => "announce_read.gif", + 'img_announce_read_mine' => "announce_read_mine.gif", + 'img_announce_read_locked' => "announce_read_locked.gif", + 'img_announce_read_locked_mine' => "announce_read_locked_mine.gif", + 'img_announce_unread' => "announce_unread.gif", + 'img_announce_unread_mine' => "announce_unread_mine.gif", + 'img_announce_unread_locked' => "announce_unread_locked.gif", + 'img_announce_unread_locked_mine' => "announce_unread_locked_mine.gif", + 'img_global_read' => "announce_read.gif", + 'img_global_read_mine' => "announce_read_mine.gif", + 'img_global_read_locked' => "announce_read_locked.gif", + 'img_global_read_locked_mine' => "announce_read_locked_mine.gif", + 'img_global_unread' => "announce_unread.gif", + 'img_global_unread_mine' => "announce_unread_mine.gif", + 'img_global_unread_locked' => "announce_unread_locked.gif", + 'img_global_unread_locked_mine' => "announce_unread_locked_mine.gif", + 'img_subforum_read' => "", + 'img_subforum_unread' => "", + 'img_pm_read' => "topic_read.gif", + 'img_pm_unread' => "topic_unread.gif", + 'img_icon_back_top' => "", + 'img_icon_post_target' = "icon_post_target.gif", + 'img_icon_post_target_unread' = "icon_post_target_unread.gif", + 'img_icon_topic_attach' => "icon_topic_attach.gif", + 'img_icon_topic_latest' => "icon_topic_latest.gif", + 'img_icon_topic_newest' => "icon_topic_newest.gif", + 'img_icon_topic_reported' => "icon_topic_reported.gif", + 'img_icon_topic_unapproved' => "icon_topic_unapproved.gif" + ); + + $this->img_array['image_lang'] = array( + 'img_icon_post_edit' => $this->img_lang, + 'img_icon_post_quote' => $this->img_lang, + 'img_button_pm_forward' => $this->img_lang, + 'img_button_pm_new' => $this->img_lang, + 'img_button_pm_reply' => $this->img_lang, + 'img_button_topic_new' => $this->img_lang, + 'img_button_topic_reply' => $this->img_lang + ); + + $img_data = &$imgs[$img]; + + if (empty($img_data)) + { + if (!isset($this->img_array[$img])) + { + // Do not fill the image to let designers decide what to do if the image is empty + $img_data = ''; + return $img_data; + } + + $img_data['src'] = PHPBB_URL . $current_template_path . ($this->img_array[$img]['image_lang'] ? $this->img_array[$img]['image_lang'] .'/' : '') . $this->img_array[$img]['image_filename']; + $img_data['width'] = (!empty($width)) ? $width : ''; //$this->img_array[$img]['image_width']; + $img_data['height'] = (!empty($height)) ? $height : ''; //$this->img_array[$img]['image_height']; + } + + $alt = (!empty($this->lang[$alt])) ? $this->lang[$alt] : $alt; + + switch ($type) + { + case 'src': + return $img_data['src']; + break; + + case 'width': + return ($width === false) ? $img_data['width'] : $width; + break; + + case 'height': + return $img_data['height']; + break; + + default: + $use_width = ($width === false) ? $img_data['width'] : $width; + + return '<img src="' . $img_data['src'] . '"' . (($use_width) ? ' width="' . $use_width . '"' : '') . (($img_data['height']) ? ' height="' . $img_data['height'] . '"' : '') . ' alt="' . $alt . '" title="' . $alt . '" />'; + break; + } + } + + /** + * Get option bit field from user options + */ + function optionget($key, $data = false) + { + if (!isset($this->keyvalues[$key])) + { + $var = ($data) ? $data : $this->data['user_options']; + $this->keyvalues[$key] = ($var & 1 << $this->keyoptions[$key]) ? true : false; + } + + return $this->keyvalues[$key]; + } + + /** + * Set option bit field for user options + */ + function optionset($key, $value, $data = false) + { + $var = ($data) ? $data : $this->data['user_options']; + + if ($value && !($var & 1 << $this->keyoptions[$key])) + { + $var += 1 << $this->keyoptions[$key]; + } + else if (!$value && ($var & 1 << $this->keyoptions[$key])) + { + $var -= 1 << $this->keyoptions[$key]; + } + else + { + return ($data) ? $var : false; + } + + if (!$data) + { + $this->data['user_options'] = $var; + return true; + } + else + { + return $var; + } + } /** |