|
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
|