Skip to content

Commit

Permalink
- Changing avatars to larger sizes and renamed files
Browse files Browse the repository at this point in the history
git-svn-id: https://pligg.svn.beanstalkapp.com/svnroot/trunk@158 68377534-e894-4f14-aad3-e92cf46e58fa
  • Loading branch information
yankidank committed Jul 26, 2012
1 parent 82f2d6b commit f3a7d04
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 6 deletions.
Binary file added avatars/Avatar_100.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added avatars/Avatar_32.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed avatars/Gravatar_15.gif
Binary file not shown.
Binary file removed avatars/Gravatar_30.gif
Binary file not shown.
33 changes: 33 additions & 0 deletions install/upgrade_2.0.php
Expand Up @@ -17,6 +17,39 @@
//echo $lang['UpgradingTables'] . '<br />';
echo '<li>Performing one-time Pligg 2.0 Upgrade</li><ul>';

// Change default avatar to new larger png files
$sql = "UPDATE ".table_config." SET var_defaultvalue='/avatars/Avatar_100.png' WHERE var_name='Default_Gravatar_Large';";
$db->query($sql);
// Change the large avatar location, only if it is still set to the default value
$sql = "UPDATE ".table_config." SET var_value='/avatars/Avatar_100.png' WHERE var_value='/avatars/Gravatar_30.gif';";
$db->query($sql);
$sql = "UPDATE ".table_config." SET var_defaultvalue='/avatars/Avatar_32.png' WHERE var_name='Default_Gravatar_Small';";
$db->query($sql);
$sql = "UPDATE ".table_config." SET var_value='/avatars/Avatar_32.png' WHERE var_value='/avatars/Gravatar_15.gif';";
$db->query($sql);
// Force a change of avatar sizes
$sql = "UPDATE ".table_config." SET var_defaultvalue='32' WHERE var_name='Avatar_Small';";
$db->query($sql);
$sql = "UPDATE ".table_config." SET var_value='32' WHERE var_name='Avatar_Small';";
$db->query($sql);
$sql = "UPDATE ".table_config." SET var_defaultvalue='100' WHERE var_name='Avatar_Large';";
$db->query($sql);
$sql = "UPDATE ".table_config." SET var_value='100' WHERE var_name='Avatar_Large';";
$db->query($sql);
// We need to regenerate avatars to the new size here
echo '<li>Changed default avatars to larger format .png files</li>';

// Update group avatar height/width sizes to 100
$sql = "UPDATE ".table_config." SET var_value='100' WHERE var_name='group_avatar_size_width';";
$db->query($sql);
$sql = "UPDATE ".table_config." SET var_defaultvalue='100' WHERE var_name='group_avatar_size_width';";
$db->query($sql);
$sql = "UPDATE ".table_config." SET var_value='100' WHERE var_name='group_avatar_size_height';";
$db->query($sql);
$sql = "UPDATE ".table_config." SET var_defaultvalue='100' WHERE var_name='group_avatar_size_height';";
$db->query($sql);
echo '<li>Changed group avatar height/width size setting to 100px</li>';

// Update User Levels, removing the 'god' level
$sql = "UPDATE ".table_users." SET user_level='moderator' WHERE user_level='admin';";
$db->query($sql);
Expand Down
12 changes: 6 additions & 6 deletions install/upgrade_config_table.sql
Expand Up @@ -20,8 +20,8 @@ INSERT INTO `config` VALUES (20, 'Submit', 'Story_Content_Tags_To_Allow_Normal',
INSERT INTO `config` VALUES (21, 'Submit', 'Submit_Require_A_URL', 'true', 'true', 'true / false', 'Require a URL when Submitting', 'Require a URL when submitting.', 'define', NULL);
INSERT INTO `config` VALUES (22, 'Submit', 'Submit_Show_URL_Input', 'true', 'true', 'true / false', 'Show the URL Input Box', 'Show the URL input box in submit step 1.', 'define', NULL);
INSERT INTO `config` VALUES (23, 'Submit', 'No_URL_Name', 'Editorial', 'Editorial', 'text', 'No URL text', 'Label to show when there is no URL provided in submit step 1.', 'define', '''');
INSERT INTO `config` VALUES (27, 'Avatars', 'Default_Gravatar_Large', '/avatars/Gravatar_30.gif', '/avatars/Gravatar_30.gif', 'Path to image', 'Default avatar (large)', 'Default location of large gravatar.', 'define', '''');
INSERT INTO `config` VALUES (28, 'Avatars', 'Default_Gravatar_Small', '/avatars/Gravatar_15.gif', '/avatars/Gravatar_15.gif', 'Path to image', 'Default avatar (small)', 'Default location of small gravatar.', 'define', '''');
INSERT INTO `config` VALUES (27, 'Avatars', 'Default_Gravatar_Large', '/avatars/Avatar_100.png', '/avatars/Avatar_100.png', 'Path to image', 'Default avatar (large)', 'Default location of large gravatar.', 'define', '''');
INSERT INTO `config` VALUES (28, 'Avatars', 'Default_Gravatar_Small', '/avatars/Avatar_32.png', '/avatars/Avatar_32.png', 'Path to image', 'Default avatar (small)', 'Default location of small gravatar.', 'define', '''');
INSERT INTO `config` VALUES (29, 'Misc', 'Enable_Extra_Fields', 'false', 'false', 'true / false', 'Enable extra fields', 'Enable extra fields when submittng stories?', 'define', NULL);
INSERT INTO `config` VALUES (30, 'Comments', 'Enable_Comment_Voting', 'true', 'true', 'true / false', 'Comment Voting', 'Allow users to vote on comments?', 'define', NULL);
INSERT INTO `config` VALUES (31, 'Comments', '$CommentOrder', '4', '4', '1 - 4', 'Comment Sort Order', '<b>1</b> = Top rated comments first, newest on top\r\n<br><b>2</b> = Newest comments first \r\n<br><b>3</b> = Top rated comments first, oldest on top\r\n<br><b>4</b> = Oldest comments first', 'normal', NULL);
Expand All @@ -43,8 +43,8 @@ INSERT INTO `config` VALUES (56, 'Submit', 'Validate_URL', 'true', 'true', 'true
INSERT INTO `config` VALUES (59, 'Submit', 'SubmitSummary_Allow_Edit', '0', '0', '1 = yes / 0 = no', 'Allow Edit of Summary', 'Allow users to edit the summary? Setting to yes will add an additional field to the submit page where users can write a brief description for the front page version of the article. Setting this to no the site will just truncate the full story content.', 'define', NULL);
INSERT INTO `config` VALUES (60, 'Avatars', 'Enable_User_Upload_Avatar', 'true', 'true', 'true / false', 'Allow User to Uploaded Avatars', 'Should users be able to upload their own avatars?', 'define', NULL);
INSERT INTO `config` VALUES (61, 'Avatars', 'User_Upload_Avatar_Folder', '/avatars/user_uploaded', '/avatars/user_uploaded', 'path', 'Avatar Storage Directory', 'This is the directory relative to your Pligg install where you want to store avatars.<br />Ex: if you installed in a subfolder named pligg, you only put /avatars/user_uploaded and NOT /pligg/avatarsuser_uploaded.', 'define', '"');
INSERT INTO `config` VALUES (62, 'Avatars', 'Avatar_Large', '30', '30', 'number', 'Large Avatar Size', 'Size of the large avatars in pixels (both width and height). Commonly used on the profile page.', 'define', NULL);
INSERT INTO `config` VALUES (63, 'Avatars', 'Avatar_Small', '15', '15', 'number', 'Small Avatar Size', 'Size of the small avatar in pixels (both width and height). Commonly used in the comments page.', 'define', NULL);
INSERT INTO `config` VALUES (62, 'Avatars', 'Avatar_Large', '100', '100', 'number', 'Large Avatar Size', 'Size of the large avatars in pixels (both width and height). Commonly used on the profile page.', 'define', NULL);
INSERT INTO `config` VALUES (63, 'Avatars', 'Avatar_Small', '32', '32', 'number', 'Small Avatar Size', 'Size of the small avatar in pixels (both width and height). Commonly used in the comments page.', 'define', NULL);
INSERT INTO `config` VALUES (64, 'Story', 'use_title_as_link', 'false', 'false', 'true / false', 'Use Story Title as External Link', 'Use the story title as link to story''s website.', 'define', NULL);
INSERT INTO `config` VALUES (65, 'Story', 'open_in_new_window', 'false', 'false', 'true / false', 'Open Story Link in New Window', 'If "Use story title as link" is set to true, setting this to true will open the link in a new window.', 'define', NULL);
INSERT INTO `config` VALUES (67, 'Misc', 'table_prefix', 'pligg_', 'pligg_', 'text', 'MySQL Table Prefix', 'Table prefix. Ex: pligg_ makes the users table become pligg_users. Note: changing this will not automatically rename your tables!', 'define', "'");
Expand All @@ -60,8 +60,8 @@ INSERT INTO `config` VALUES (81 , 'Groups', 'enable_group', 'true', 'true', 'tru
INSERT INTO `config` VALUES (82 , 'Groups', 'max_user_groups_allowed', '10', '10', 'number', 'Max Groups User Create', 'Maximum number of groups a user is allowed to create', 'define', 'NULL');
INSERT INTO `config` VALUES (83 , 'Groups', 'max_groups_to_join', '10', '10', 'number', 'Max Joinable Groups', 'Maxiumum number of groups a user is allowed to join', 'define', 'NULL');
INSERT INTO `config` VALUES (84 , 'Groups', 'auto_approve_group', 'true', 'true', 'true/false', 'Auto Approve New Groups', 'Should new groups be auto-approved? Set to false if you want to moderate all new groups being created.', 'define', 'NULL');
INSERT INTO `config` VALUES (85 , 'Groups', 'group_avatar_size_width', '90', '90', 'number', 'Width of Group Avatar', 'Width in pixels for the group avatar', 'define', 'NULL');
INSERT INTO `config` VALUES (86 , 'Groups', 'group_avatar_size_height', '90', '90', 'number', 'Height of Group Avatar', 'Height in pixels for the group avatar', 'define', 'NULL');
INSERT INTO `config` VALUES (85 , 'Groups', 'group_avatar_size_width', '100', '100', 'number', 'Width of Group Avatar', 'Width in pixels for the group avatar', 'define', 'NULL');
INSERT INTO `config` VALUES (86 , 'Groups', 'group_avatar_size_height', '100', '100', 'number', 'Height of Group Avatar', 'Height in pixels for the group avatar', 'define', 'NULL');
INSERT INTO `config` VALUES (87 , 'Voting', 'votes_per_ip', '1', '1', 'number', 'Votes Allowed from one IP', 'This feature is turned on by default to prevent users from voting from multiple registered accounts from the same computer network. <b>0</b> = disable feature.', 'define', NULL);
INSERT INTO `config` VALUES (88 , 'Submit', 'limit_time_to_edit', '0', '0', '1 = on / 0 = off', 'Limit time to edit stories', 'This feature allows you to limit the amount of time a user has before they can no longer edit a submitted story.<br /><b>0</b> = Unlimited amount of time to edit<br><b>1</b> = specified amount of time', 'define', NULL);
INSERT INTO `config` VALUES (89 , 'Submit', 'edit_time_limit', '0', '0', 'number', 'Minutes before a user is no longer allowed to edit a story', '<b>0</b> = Disable the users ability to ever edit the story. Requires that you enable Limit Time To Edit Stories (set to 1).', 'define', NULL);
Expand Down

0 comments on commit f3a7d04

Please sign in to comment.