Project

General

Profile

« Previous | Next » 

Revision 1745

Added by Dietmar about 12 years ago

! add div container in page_content for each sections,
! update droplets SectionPicker, ShowWysiwyg and ShowRandomWysiwyg
! put sec_anchor in this div, sec_anchor fixed in all found files
sec_anchor default now set to "section_",
sec_anchor can't be empty for future developement

View differences:

branches/2.8.x/CHANGELOG
13 13

  
14 14

  
15 15

  
16
07 Sep-2012 Build 1744 Dietmar Woellbrink (Luisehahne)
16
08 Sep-2012 Build 1745 Dietmar Woellbrink (Luisehahne)
17
! add div container in page_content for each sections,
18
! update droplets SectionPicker, ShowWysiwyg and ShowRandomWysiwyg
19
! put sec_anchor in this div, sec_anchor fixed in all found files
20
  sec_anchor default now set to "section_", 
21
  sec_anchor can't be empty for future developement
22
08 Sep-2012 Build 1744 Dietmar Woellbrink (Luisehahne)
17 23
# typofix upgrade-script Adding redirect timer to settings table
18 24
07 Sep-2012 Build 1743 Dietmar Woellbrink (Luisehahne)
19 25
! styling permissions blocks in page settings by backend theme css
branches/2.8.x/wb/upgrade-script.php
387 387
/**********************************************************
388 388
 *  - Adding field sec_anchor to settings table
389 389
 */
390
echo "<br />Adding sec_anchor to settings table";
390
echo "<br />Adding/updating sec_anchor to settings table";
391 391
$cfg = array(
392 392
	'sec_anchor' => defined('SEC_ANCHOR') ? SEC_ANCHOR : 'wb_'
393 393
);
......
398 398
/**********************************************************
399 399
 *  - Adding redirect timer to settings table
400 400
 */
401
echo "Adding redirect timer to settings table";
401
echo "Adding/updating redirect timer to settings table";
402 402
$cfg = array(
403 403
	'redirect_timer' => defined('REDIRECT_TIMER') ? REDIRECT_TIMER : '1500'
404 404
);
......
407 407
/**********************************************************
408 408
 *  - Adding rename_files_on_upload to settings table
409 409
 */
410
echo "Updating rename_files_on_upload to settings table";
410
echo "Adding/Updating rename_files_on_upload to settings table";
411 411
$cfg = array(
412 412
	'rename_files_on_upload' => (defined('RENAME_FILES_ON_UPLOAD') ? RENAME_FILES_ON_UPLOAD : 'ph.*?,cgi,pl,pm,exe,com,bat,pif,cmd,src,asp,aspx,js')
413 413
);
......
416 416
/**********************************************************
417 417
 *  - Adding mediasettings to settings table
418 418
 */
419
echo "Adding mediasettings to settings table";
419
echo "Adding/updating mediasettings to settings table";
420 420
$cfg = array(
421 421
	'mediasettings' => (defined('MEDIASETTINGS') ? MEDIASETTINGS : ''),
422 422
);
......
426 426
/**********************************************************
427 427
 *  - Adding fingerprint_with_ip_octets to settings table
428 428
 */
429
echo "Adding fingerprint_with_ip_octets to settings table";
429
echo "Adding/updating fingerprint_with_ip_octets to settings table";
430 430
$cfg = array(
431 431
	'fingerprint_with_ip_octets' => (defined('FINGERPRINT_WITH_IP_OCTETS') ? FINGERPRINT_WITH_IP_OCTETS : '2'),
432 432
	'secure_form_module' => (defined('SECURE_FORM_MODULE') ? SECURE_FORM_MODULE : '')
......
437 437
/**********************************************************
438 438
 *  - Adding page_icon_dir to settings table
439 439
 */
440
echo "Adding page_icon_dir to settings table";
440
echo "Adding/updating page_icon_dir to settings table";
441 441
$cfg = array(
442 442
	'page_extended' => (defined('PAGE_ICON_DIR') ? PAGE_ICON_DIR : '/templates/*/title_images'),
443 443
);
......
446 446
/**********************************************************
447 447
 *  - Adding page_extended to settings table
448 448
 */
449
echo "Adding ppage_extended to settings table";
449
echo "Adding/updating ppage_extended to settings table";
450 450
$cfg = array(
451 451
	'page_extended' => (defined('PAGE_EXTENDED') ? PAGE_EXTENDED : 'true'),
452 452
);
......
454 454
echo (db_update_key_value( 'settings', $cfg ) ? " $OK<br />" : " $FAIL!<br />");
455 455

  
456 456
/**********************************************************
457
 *  - Adding sec_anchor to settings table
458
 */
459
echo "Adding/updating sec_anchor to settings table";
460
$cfg = array(
461
	'sec_anchor' => (defined('SEC_ANCHOR') && (SEC_ANCHOR=='') ? 'section_' : SEC_ANCHOR)
462
);
463

  
464
echo (db_update_key_value( 'settings', $cfg ) ? " $OK<br />" : " $FAIL!<br />");
465
/**********************************************************
457 466
 *  - Adding dev_infos to settings table
458 467
 */
459
echo "Adding dev_infos to settings table";
468
echo "Adding/updating dev_infos to settings table";
460 469
$cfg = array(
461 470
	'dev_infos' => (defined('DEV_INFOS') ? DEV_INFOS : 'false')
462 471
);
branches/2.8.x/wb/admin/skel/themes/htt/settings.htt
184 184
		</div>
185 185

  
186 186
		<div class="mbox sub-row">
187
			<label class="setting_name">{TEXT_CONFIRMED_REGISTRATION}:</label>
187
			<label title="{HELP_ACTIVATION_MAIL}" class="setting_name">{TEXT_CONFIRMED_REGISTRATION}:</label>
188 188
			<span>
189 189
			<input class="radio" type="radio" name="confirmed_registration" id="confirmed_registration_true" value="1"{CONFIRMED_REGISTRATION_ENABLED} />
190 190
		<label for="confirmed_registration_true">{TEXT_ENABLED}</label>
......
482 482
	 		<label class="setting_name" id="{ADVANCED_FILE_PERMS_ID}1">{TEXT_FILESYSTEM_PERMISSIONS}:</label>
483 483
			<div class="cleft" id="file_mode">
484 484
				<div class="input" >
485
					<table class="permission_box" summary="" cellpadding="2" cellspacing="0" border="0" id="{ADVANCED_FILE_PERMS_ID}2">
485
					<table class="permission_box" summary="" id="{ADVANCED_FILE_PERMS_ID}2">
486 486
			<caption>{TEXT_FILES}: {STRING_FILE_MODE}</caption>
487 487
		<thead>
488 488
		<tr>
......
528 528
			</div>
529 529
			<div class="cright" id="dir_mode">
530 530
				<div class="input" >
531
					<table class="permission_box" summary="" cellpadding="2" cellspacing="0" border="0" id="{ADVANCED_FILE_PERMS_ID}3">
531
					<table class="permission_box" summary="" id="{ADVANCED_FILE_PERMS_ID}3">
532 532
		<caption>{TEXT_DIRECTORIES}: {STRING_DIR_MODE}</caption>
533 533
		<thead>
534 534
		<tr>
branches/2.8.x/wb/admin/interface/version.php
51 51

  
52 52
// check if defined to avoid errors during installation (redirect to admin panel fails if PHP error/warnings are enabled)
53 53
if(!defined('VERSION')) define('VERSION', '2.8.3');
54
if(!defined('REVISION')) define('REVISION', '1744');
54
if(!defined('REVISION')) define('REVISION', '1745');
55 55
if(!defined('SP')) define('SP', '');
branches/2.8.x/wb/admin/settings/save.php
154 154
}
155 155

  
156 156
$allow_tags_in_fields = array('website_header', 'website_footer','website_signature');
157
$allow_empty_values = array('website_header','website_footer','sec_anchor','pages_directory','page_spacer','website_signature,page_icon_dir');
157
$allow_empty_values = array('website_header','website_footer','pages_directory','page_spacer','website_signature,page_icon_dir');
158 158
$disallow_in_fields = array('pages_directory', 'media_directory','wb_version');
159 159

  
160 160
// Query current settings in the db, then loop through them and update the db with the new value
......
185 185
				$value=$file_mode;
186 186
	 			$passed = true;
187 187
			break;
188
			case 'sec_anchor':
189
				$value=(($value=='') ? 'section_' : $value);
190
	 			$passed = true;
188 191
			case 'pages_directory':
189 192
				break;
190 193
			case 'wbmailer_smtp_auth':
branches/2.8.x/wb/admin/settings/languages/EN.php
7 7

  
8 8
$TEXT['WEBSITE_SIGNATURE'] = 'Contact Signature';
9 9
$TEXT['PAGE_EXTENDED'] = 'Extended Pagesettings';
10
$TEXT['CONFIRMED_REGISTRATION'] = 'Activation-Mail';
11
$HELP['ACTIVATION_MAIL'] = 'Registration per Activation-Mail (Enabled) or Directregistration (Disabled)';
branches/2.8.x/wb/admin/settings/languages/DE.php
8 8

  
9 9
$TEXT['WEBSITE_SIGNATURE'] = 'Kontakt Signature';
10 10
$TEXT['PAGE_EXTENDED'] = 'Erweiterte Seiteneinstellungen';
11
$TEXT['CONFIRMED_REGISTRATION'] = 'Aktivierungs-Mail';
12
$HELP['ACTIVATION_MAIL'] = 'Registrierung per Aktivierungs-Mail (Eingeschaltet) oder Direktregistrierung (Ausgeschaltet)';
branches/2.8.x/wb/admin/settings/index.php
69 69
$template->set_block('main_block', 'show_access_block',           'show_access');
70 70
$template->set_block('main_block', 'show_search_block',           'show_search');
71 71
$template->set_block('main_block', 'show_redirect_timer_block',   'show_redirect_timer');
72
/*-- insert all needed vars from language files ----------------------------------------*/
73
	$template->set_var($mLang->getLangArray());
72 74

  
73 75
// Query current settings in the db, then loop through them and print them
74 76
$query = "SELECT * FROM ".TABLE_PREFIX."settings";
......
157 159

  
158 160
	$sSelected = ' selected="selected"';
159 161
	$checked   = ' checked="checked"';
160
/*-- insert all needed vars from language files ----------------------------------------*/
161
	$template->set_var($mLang->getLangArray());
162 162

  
163 163
	$template->set_var(array(
164 164
						'WB_URL' => WB_URL,
......
901 901
					'TEXT_EXECUTE' => $TEXT['EXECUTE'],
902 902
					'TEXT_WARN_PAGE_LEAVE' => '',
903 903
					'TEXT_SMART_LOGIN' => $TEXT['SMART_LOGIN'],
904
					'TEXT_CONFIRMED_REGISTRATION' => $TEXT['EMAIL'].' '.$TEXT['SIGNUP'],
905 904
					'TEXT_MULTIPLE_MENUS' => $TEXT['MULTIPLE_MENUS'],
906 905
					'TEXT_HOMEPAGE_REDIRECTION' => $TEXT['HOMEPAGE_REDIRECTION'],
907 906
					'TEXT_SECTION_BLOCKS' => $TEXT['SECTION_BLOCKS'],
......
913 912
					'TEXT_HOME_FOLDERS' => $TEXT['HOME_FOLDERS'],
914 913
					'TEXT_WYSIWYG_STYLE' => $TEXT['WYSIWYG_STYLE'],
915 914
					'TEXT_WORLD_WRITEABLE_FILE_PERMISSIONS' => $TEXT['WORLD_WRITEABLE_FILE_PERMISSIONS'],
916
					'MODE_SWITCH_WARNING' => $MESSAGE['SETTINGS']['MODE_SWITCH_WARNING'],
917
					'WORLD_WRITEABLE_WARNING' => $MESSAGE['SETTINGS']['WORLD_WRITEABLE_WARNING'],
915
					'MODE_SWITCH_WARNING' => $MESSAGE['SETTINGS_MODE_SWITCH_WARNING'],
916
					'WORLD_WRITEABLE_WARNING' => $MESSAGE['SETTINGS_WORLD_WRITEABLE_WARNING'],
918 917
					'TEXT_MODULE_ORDER' => $TEXT['MODULE_ORDER'],
919 918
					'TEXT_MAX_EXCERPT' => $TEXT['MAX_EXCERPT'],
920 919
					'TEXT_TIME_LIMIT' => $TEXT['TIME_LIMIT']
branches/2.8.x/wb/framework/frontend.functions.php
305 305
				if(file_exists(WB_PATH.'/modules/'.$module.'/view.php')) {
306 306
				// fetch content -- this is where to place possible output-filters (before highlighting)
307 307
					ob_start(); // fetch original content
308
				// make a anchor for every section
309
    				if(defined('SEC_ANCHOR') && SEC_ANCHOR!='') {
310
    					echo "\n".'<a class="section_anchor" id="'.SEC_ANCHOR.$section_id.'" name="'.SEC_ANCHOR.$section_id.'"></a>'."\n";
311
    				}
308
                    $sectionAnchor = (defined('SEC_ANCHOR') && SEC_ANCHOR!='') ? SEC_ANCHOR.$section_id : 'section_'.$section_id;
309
                    echo PHP_EOL.'<div id="'.$sectionAnchor.'" class="'.$module.'" >'.PHP_EOL;
312 310
					require(WB_PATH.'/modules/'.$module.'/view.php');
311
                    echo PHP_EOL.'</div><!-- '.$module.$section_id.' -->'.PHP_EOL;
313 312
					$content = ob_get_clean();
314 313
				} else {
315 314
					continue;
branches/2.8.x/wb/install/save.php
437 437
	." ('er_level', ''),"
438 438
	." ('default_language', '$default_language'),"
439 439
	." ('app_name', 'wb_$session_rand'),"
440
	." ('sec_anchor', 'wb_'),"
440
	." ('sec_anchor', 'section_'),"
441 441
	." ('default_timezone', '$default_timezone'),"
442 442
	." ('default_date_format', 'M d Y'),"
443 443
	." ('default_time_format', 'g:i A'),"
branches/2.8.x/wb/modules/wysiwyg/save.php
57 57
	$aErrors[] = $MESSAGE['GENERIC_NOT_UPGRADED'].((defined('DEBUG') && DEBUG) ? '<br />'.$MESSAGE['FRONTEND_SORRY_NO_ACTIVE_SECTIONS'] : '');
58 58
}
59 59

  
60
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? '#'.SEC_ANCHOR.$section['section_id'] : '' );
60
$sec_anchor = '#'.(defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? SEC_ANCHOR.$section_id : 'section_'.$section_id );
61 61
if(defined('EDIT_ONE_SECTION') and EDIT_ONE_SECTION){
62 62
    $edit_page = ADMIN_URL.'/pages/modify.php?page_id='.$page_id.'&wysiwyg='.$section_id;
63 63
} else {
branches/2.8.x/wb/modules/droplets/example/SectionPicker.php
18 18
					$_sFrontendCss = '<link href="'.WB_URL.$_sFrontendCss.'" rel="stylesheet" type="text/css" media="screen" />';
19 19
				}
20 20
			} else { $_sFrontendCss = ''; }
21
			$section_id = $sid;
21 22
			ob_start();
22
			$section_id = $sid;
23
			require(WB_PATH.'/modules/'.$module.'/view.php');
23
            $sectionAnchor = (defined('SEC_ANCHOR') && SEC_ANCHOR!='') ? SEC_ANCHOR.$section_id : 'section_'.$section_id;
24
            echo PHP_EOL.'<div id="'.$sectionAnchor.'" class="'.$module.'" >'.PHP_EOL;
25
            require(WB_PATH.'/modules/'.$module.'/view.php');
26
            echo PHP_EOL.'</div><!-- '.$module.$section_id.' -->'.PHP_EOL;
24 27
			$content = $_sFrontendCss.ob_get_clean();
25 28
			$section_id = $oldSid; // restore old sectionID
26 29
		}
branches/2.8.x/wb/modules/droplets/example/ShowWysiwyg.php
1 1
//:Display one defined WYSIWYG section
2 2
//:Use [[ShowWysiwyg?section=10]]
3 3
global $database, $section_id;
4
	$content = '';
5
	$section = isset($section) ? intval($section) : 0;
6
	if ($section) {
7
		if (is_readable(WB_PATH.'/modules/wysiwyg/view.php')) {
8
		// if valid section is given and module wysiwyg is installed
9
			$iOldSectionId = intval($section_id); // save old SectionID
10
			$section_id = $section;
11
			ob_start(); // generate output by regulary wysiwyg module
12
			require(WB_PATH.'/modules/wysiwyg/view.php');
13
			$content = ob_get_clean();
14
			$section_id = $iOldSectionId; // restore old SectionId
15
		}
16
	}
4
$content = '';
5
$section = isset($section) ? intval($section) : 0;
6
if ($section) {
7
    if (is_readable(WB_PATH.'/modules/wysiwyg/view.php')) {
8
        // if valid section is given and module wysiwyg is installed
9
        $iOldSectionId = intval($section_id); // save old SectionID
10
        $section_id = $section;
11
        ob_start(); // generate output by regulary wysiwyg module
12
        $sectionAnchor = (defined('SEC_ANCHOR') && SEC_ANCHOR!='') ? SEC_ANCHOR.$section_id : 'section_'.$section_id;
13
        echo PHP_EOL.'<div id="'.$sectionAnchor.'" class="'.$module.'" >'.PHP_EOL;
14
        require(WB_PATH.'/modules/wysiwyg/view.php');
15
        echo PHP_EOL.'</div><!-- '.$module.$section_id.' -->'.PHP_EOL;
16
        $content = ob_get_clean();
17
        $section_id = $iOldSectionId; // restore old SectionId
18
    }
19
}
17 20
return $content;
branches/2.8.x/wb/modules/droplets/example/ShowRandomWysiwyg.php
1 1
//:Randomly display one WYSIWYG section from a given list
2 2
//:Use [[ShowRandomWysiwyg?section=10,12,15,20]] possible Delimiters: [ ,;:|-+#/ ]
3 3
global $database, $section_id;
4
	$content = '';
5
	if (isset($section)) {
6
		if( preg_match('/^[0-9]+(?:\s*[\,\|\-\;\:\+\#\/]\s*[0-9]+\s*)*$/', $section)) {
7
			if (is_readable(WB_PATH.'/modules/wysiwyg/view.php')) {
8
			// if valid arguments given and module wysiwyg is installed
9
				// split and sanitize arguments
10
				$aSections = preg_split('/[\s\,\|\-\;\:\+\#\/]+/', $section);
11
				$iOldSectionId = intval($section_id); // save old SectionID
12
				$section_id = $aSections[array_rand($aSections)]; // get random element
13
				ob_start(); // generate output by wysiwyg module
14
				require(WB_PATH.'/modules/wysiwyg/view.php');
15
				$content = ob_get_clean();
16
				$section_id = $iOldSectionId; // restore old SectionId
17
			}
18
		}
19
	}
4
$content = '';
5
if (isset($section)) {
6
    if( preg_match('/^[0-9]+(?:\s*[\,\|\-\;\:\+\#\/]\s*[0-9]+\s*)*$/', $section)) {
7
        if (is_readable(WB_PATH.'/modules/wysiwyg/view.php')) {
8
            // if valid arguments given and module wysiwyg is installed
9
            // split and sanitize arguments
10
            $aSections = preg_split('/[\s\,\|\-\;\:\+\#\/]+/', $section);
11
            $iOldSectionId = intval($section_id); // save old SectionID
12
            $section_id = $aSections[array_rand($aSections)]; // get random element
13
            ob_start(); // generate output by wysiwyg module
14
            $sectionAnchor = (defined('SEC_ANCHOR') && SEC_ANCHOR!='') ? SEC_ANCHOR.$section_id : 'section_'.$section_id;
15
            echo PHP_EOL.'<div id="'.$sectionAnchor.'" class="'.$module.'" >'.PHP_EOL;
16
            require(WB_PATH.'/modules/wysiwyg/view.php');
17
            echo PHP_EOL.'</div><!-- '.$module.$section_id.' -->'.PHP_EOL;
18
            $content = ob_get_clean();
19
            $section_id = $iOldSectionId; // restore old SectionId
20
        }
21
    }
22
}
20 23
return $content;
branches/2.8.x/wb/modules/form/add_field.php
20 20
// Include WB admin wrapper script
21 21
require(WB_PATH.'/modules/admin.php');
22 22

  
23
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? '#'.SEC_ANCHOR.$section['section_id'] : '' );
23
$sec_anchor = '#'.(defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? SEC_ANCHOR.$section_id : 'section_'.$section_id );
24 24

  
25 25
// Include the ordering class
26 26
require(WB_PATH.'/framework/class.order.php');
branches/2.8.x/wb/modules/form/delete_field.php
12 12
 * @version         $Id$
13 13
 * @filesource		$HeadURL$
14 14
 * @lastmodified    $Date$
15
 * @description     
15
 * @description
16 16
 */
17 17

  
18 18
require('../../config.php');
......
27 27
 $admin->print_error($MESSAGE['GENERIC_SECURITY_ACCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
28 28
}
29 29

  
30
$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? '#'.SEC_ANCHOR.$section['section_id'] : '' );
30
$sec_anchor = '#'.(defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? SEC_ANCHOR.$section_id : 'section_'.$section_id );
31 31

  
32 32
// Delete row
33 33
$database->query("DELETE FROM ".TABLE_PREFIX."mod_form_fields WHERE field_id = '$field_id'");
branches/2.8.x/wb/modules/admin.php
217 217
			}
218 218
		}
219 219

  
220
		$sec_anchor = (defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? 'id="'.SEC_ANCHOR.$section['section_id'].'"' : '');
221
		print '<div class="section-info" ><b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
220
        $sec_anchor = '#'.(defined( 'SEC_ANCHOR' ) && ( SEC_ANCHOR != '' )  ? SEC_ANCHOR.$section_id : 'section_'.$section_id );
221
		//print '<div class="section-info" ><b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
222
		print '<div class="section-info" '.$sec_anchor.' ><b>' . $TEXT['BLOCK'] . ': </b>' . $block_name;
222 223
		print '<b>  Modul: </b>' . $section['module']." ";
223 224
		print '<b>  ID: </b><a' . $section_id."></a></div>\n";
224 225
	}

Also available in: Unified diff