Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.1.1 #2

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

Osclass theme using twitter bootstrap 3-1

The majority of pages have just had the classes updated to the new bootstrap class. css folder: custom.css has old style removed normalizer added new bootstrap css and theme css have been added currently the unminified is being called by the script, until 100%

fonts: current fonts have been added

classes have been updated in the functions.php

js file: new bootstrap with mini removed old js

TODO: combine the javascripts, new screenshot, tests, language

fixes: modal, drop downs, pagination,flash messages, custom fields in item-post,-edit
4 changes: 1 addition & 3 deletions twitter/404.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,12 @@
</head>
<body>
<?php osc_current_web_theme_path('header.php') ; ?>
<div class="container margin-top-10">
<?php twitter_show_flash_message() ; ?>
<div class="row">
<div class="span16 columns">
<div class="col-md-8">
<h1><?php _e('Page not found', 'twitter') ; ?></h1>
</div>
</div>
</div>
<?php osc_current_web_theme_path('footer.php') ; ?>
</body>
</html>
138 changes: 84 additions & 54 deletions twitter/admin/admin_settings.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?php
if( Params::getParam("action_specific") != '' ) {
<?php if ( (!defined('ABS_PATH')) ) exit('ABS_PATH is not loaded. Direct access is not allowed.'); ?>
<?php if ( !OC_ADMIN ) exit('User access is not allowed.'); ?>
<?php
if( Params::getParam("action_specific") != '' ) {
switch( Params::getParam("action_specific") ) {
case('upload_logo'):
$package = Params::getFiles("logo") ;
Expand All @@ -26,56 +28,84 @@

osc_show_flash_message('admin') ;
?>
<div id="settings_form" style="border: 1px solid #ccc; background: #eee; ">
<div style="padding: 20px;">
<?php if( is_writable( WebThemes::newInstance()->getCurrentThemePath() . "images/") ) { ?>
<p style="border-bottom: 1px black solid;padding-bottom: 10px;">
<img style="padding-right: 10px;"src="<?php echo osc_current_admin_theme_url('images/info-icon.png') ; ?>"/>
<?php _e('The preferred size of the logo is 600x100', 'twitter') ; ?>.
<?php if( file_exists( WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg" ) ) { ?>
<strong><?php _e('Note: Uploading another logo will overwrite current logo', 'twitter') ; ?>.</strong>
<?php } ?>
</p>
<form action="<?php echo osc_admin_render_theme_url('oc-content/themes/twitter/admin/admin_settings.php') ; ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="action_specific" value="upload_logo" />
<p>
<label for="package"><?php _e('Logo image', 'twitter') ; ?> (png,gif,jpg)</label>
<input type="file" name="logo" id="package" />
</p>
<input id="button_save" type="submit" value="<?php _e('Upload', 'twitter') ; ?>" />
</form>
<div>
<?php if(file_exists( WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg" ) ) {?>
<p>
<?php _e('Preview', 'twitter') ; ?>:<br>
<img border="0" alt="<?php echo osc_page_title() ; ?>" src="<?php echo osc_current_web_theme_url('images/logo.jpg') ; ?>"/>
<form action="<?php echo osc_admin_render_theme_url('oc-content/themes/twitter/admin/admin_settings.php') ; ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="action_specific" value="remove" />
<input id="button_remove" type="submit" value="<?php _e('Remove logo', 'twitter') ; ?>" />
</form>
</p>
<?php } else { ?>
<p><?php _e('Has not uploaded any logo image', 'twitter') ; ?></p>
<?php } ?>
</div>
<div style="clear: both;"></div>
<?php } else { ?>
<div id="flash_message">
<p>
<?php
$msg = sprintf(__('The images folder %s is not writable on your server', 'twitter'), WebThemes::newInstance()->getCurrentThemePath() ."images/" ) . ", " ;
$msg .= __('OSClass can\'t upload logo image from the administration panel', 'twitter') . '. ' ;
$msg .= __('Please make the mentioned images folder writable', 'twitter') . '.' ;
echo $msg;
?>
</p>
<p>
<?php _e('To make a directory writable under UNIX execute this command from the shell', 'twitter') ; ?>:
</p>
<p style="background-color: white; border: 1px solid black; padding: 8px;">
chmod a+w <?php echo WebThemes::newInstance()->getCurrentThemePath() . "images/" ; ?>
</p>
</div>
<?php } ?>
<div class="row" style="margin:10px">
<?php if( !osc_get_preference('donation', 'twitter_theme') ) { ?>
<form name="_xclick" action="https://www.paypal.com/in/cgi-bin/webscr" method="post" class="nocsrf">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="rm" value="2">
<input type="hidden" name="business" value="[email protected]">
<input type="hidden" name="item_name" value="Osclass project">
<input type="hidden" name="return" value="http://osclass.org/paypal/">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US" />
<input type="hidden" name="custom" value="<?php echo osc_admin_render_theme_url('oc-content/themes/twitter/admin/admin_settings.php'); ?>&donation=successful&source=twitter">
<div id="flashmessage" class="flashmessage flashmessage-inline flashmessage-warning" style="color: #505050; display: block; ">
<p><?php _e('I would like to contribute to the development of Osclass with a donation of', 'twitter'); ?></p>
<select name="amount" class="form-control">
<option value="50">50$</option>
<option value="25">25$</option>
<option value="10" selected>10$</option>
<option value="5">5$</option>
<option value=""><?php _e('Custom', 'twitter'); ?></option>
</select>
<button class="btn btn-success" type="submit" value="<?php echo osc_esc_html(__('Donate', 'twitter')); ?>"><?php _e('donate', 'twitter') ; ?></button>
</div>
</div>
</form>
<?php } ?>
</div>

<div class="row" style="margin:10px">
<div id="settings_form" class="well">
<div style="padding: 20px;">
<?php if( is_writable( WebThemes::newInstance()->getCurrentThemePath() . "images/") ) { ?>
<p style="border-bottom: 1px black solid;padding-bottom: 10px;">
<img style="padding-right: 10px;"src="<?php echo osc_current_admin_theme_url('images/info-icon.png') ; ?>"/>
<?php _e('The preferred size of the logo is 600x100', 'twitter') ; ?>.
<?php if( file_exists( WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg" ) ) { ?>
<strong><?php _e('Note: Uploading another logo will overwrite current logo', 'twitter') ; ?>.</strong>
<?php } ?>
</p>
<form action="<?php echo osc_admin_render_theme_url('oc-content/themes/twitter/admin/admin_settings.php') ; ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="action_specific" value="upload_logo" />
<p>
<label for="package"><?php _e('Logo image', 'twitter') ; ?> (png,gif,jpg)</label>
<input type="file" name="logo" id="package" />
</p>
<input id="button_save" type="submit" value="<?php _e('Upload', 'twitter') ; ?>" />
</form>
<div>
<?php if(file_exists( WebThemes::newInstance()->getCurrentThemePath() . "images/logo.jpg" ) ) {?>
<p>
<?php _e('Preview', 'twitter') ; ?>:<br>
<img alt="<?php echo osc_page_title() ; ?>" src="<?php echo osc_current_web_theme_url('images/logo.jpg') ; ?>"/>
<form action="<?php echo osc_admin_render_theme_url('oc-content/themes/twitter/admin/admin_settings.php') ; ?>" method="post" enctype="multipart/form-data">
<input type="hidden" name="action_specific" value="remove" />
<input id="button_remove" type="submit" value="<?php _e('Remove logo', 'twitter') ; ?>" />
</form>
</p>
<?php } else { ?>
<p><?php _e('Has not uploaded any logo image', 'twitter') ; ?></p>
<?php } ?>
</div>
<div style="clr"></div>
<?php } else { ?>
<div id="flash_message">
<p>
<?php
$msg = sprintf(__('The images folder %s is not writable on your server', 'twitter'), WebThemes::newInstance()->getCurrentThemePath() ."images/" ) . ", " ;
$msg .= __('OSClass can\'t upload logo image from the administration panel', 'twitter') . '. ' ;
$msg .= __('Please make the mentioned images folder writable', 'twitter') . '.' ;
echo $msg;
?>
</p>
<p>
<?php _e('To make a directory writable under UNIX execute this command from the shell', 'twitter') ; ?>:
</p>
<p style="background-color: white; border: 1px solid black; padding: 8px;">
chmod a+w <?php echo WebThemes::newInstance()->getCurrentThemePath() . "images/" ; ?>
</p>
</div>
<?php } ?>
</div>
</div>
</div>
37 changes: 20 additions & 17 deletions twitter/alert-form.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,28 @@
<br />
<div class="well well-lg">
<h5><?php _e('Subscribe to this search', 'twitter') ; ?></h5>
<form class="form" action="<?php echo osc_base_url(true); ?>" method="post" name="sub_alert" id="sub_alert">
<div class="form-group"><?php AlertForm::page_hidden() ; ?>
<?php AlertForm::alert_hidden() ; ?>
<?php if( osc_is_web_user_logged_in() ) { ?>
<?php AlertForm::user_id_hidden() ; ?>
<?php AlertForm::email_hidden() ; ?>
<?php } else { ?>
<?php AlertForm::user_id_hidden() ; ?>
<input id="alert_email" type="email" name="alert_email" value="">
<?php } ?>
</div>
<button type="submit" class="btn btn-success btn-sm"><?php _e('Subscribe now!', 'twitter') ; ?></button>

</form>
</div>
<script type="text/javascript">
$(document).ready(function() {
$(".alert-button").bind('click', function() {
$.post("<?php echo osc_base_url(true); ?>", { email: $("#alert_email").val(), userid: $("#alert_userId").val(), alert: $("#alert").val(), page: "ajax", action: "alerts" },
function(data) {
if(data == 1) {
alert("<?php _e('You have sucessfully subscribed to the alert', 'modern') ; ?>") ;
alert("<?php _e('You have sucessfully subscribed to the alert', 'twitter') ; ?>") ;
} else if(data == -1) {
alert("<?php _e('Invalid email address', 'twitter') ; ?>") ;
} else {
Expand All @@ -15,19 +33,4 @@ function(data) {
return false;
}) ;
}) ;
</script>
<h4><?php _e('Subscribe to this search', 'twitter') ; ?></h4>
<form action="<?php echo osc_base_url(true); ?>" method="post" name="sub_alert" id="sub_alert">
<fieldset>
<?php AlertForm::page_hidden() ; ?>
<?php AlertForm::alert_hidden() ; ?>
<?php if( osc_is_web_user_logged_in() ) { ?>
<?php AlertForm::user_id_hidden() ; ?>
<?php AlertForm::email_hidden() ; ?>
<?php } else { ?>
<?php AlertForm::user_id_hidden() ; ?>
<input id="alert_email" type="text" name="alert_email" value="">
<?php } ?>
<button type="submit" class="btn alert-button" ><?php _e('Subscribe now!', 'twitter') ; ?></button>
</fieldset>
</form>
</script>
55 changes: 25 additions & 30 deletions twitter/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,50 @@
</head>
<body>
<?php osc_current_web_theme_path('header.php') ; ?>
<?php twitter_show_flash_message() ; ?>
<div class="container">
<div class="contact">
<?php twitter_show_flash_message() ; ?>
</div>
<?php echo twitter_breadcrumb('&raquo;') ; ?>
<div class="contact well">
<form action="<?php echo osc_base_url(true) ; ?>" method="post" name="contact" onsubmit="return doContact();">
<div class="row">
<div class="well">
<h4><?php _e('Contact us', 'twitter') ; ?></h4>
<form class="form-horizontal" role="form" action="<?php echo osc_base_url(true) ; ?>" method="post" name="contact" onsubmit="return doContact();">
<input type="hidden" name="page" value="contact" />
<input type="hidden" name="action" value="contact_post" />
<fieldset>
<legend><?php _e('Contact us', 'twitter') ; ?></legend>
<div class="clearfix">
<label for="subject"><?php _e('Subject', 'twitter') ; ?> *</label>
<div class="input">
<input class="xlarge" type="text" value="" name="subject" id="subject">
<div class="form-group">
<label class="col-sm-2 control-label" for="subject"><?php _e('Subject', 'twitter') ; ?> *</label>
<div class="col-sm-10">
<input class="form-control" type="text" placeholder="Subject" name="subject" id="subject">
</div>
</div>
<div class="clearfix">
<label for="message"><?php _e('Message', 'twitter') ; ?> *</label>
<div class="input">
<textarea class="xlarge" id="message" name="message" rows="6"></textarea>
<div class="form-group">
<label class="col-sm-2 control-label" for="message"><?php _e('Message', 'twitter') ; ?> *</label>
<div class="col-sm-10">
<textarea class="form-control" id="message" name="message" rows="6"></textarea>
</div>
</div>
<div class="clearfix">
<label for="yourName"><?php _e('Your name', 'twitter') ; ?> *</label>
<div class="input">
<input class="xlarge" type="text" value="" name="yourName" id="yourName">
<div class="form-group">
<label class="col-sm-2 control-label" for="yourName"><?php _e('Your name', 'twitter') ; ?> *</label>
<div class="col-sm-10">
<input class="form-control" type="text" placeholder="Full Name" name="yourName" id="yourName">
</div>
</div>
<div class="clearfix">
<label for="yourEmail"><?php _e('Your e-mail address', 'twitter') ; ?> *</label>
<div class="input">
<input class="xlarge" type="text" value="" name="yourEmail" id="yourEmail">
<div class="form-group">
<label class="col-sm-2 control-label" for="yourEmail"><?php _e('Your E-mail', 'twitter') ; ?> *</label>
<div class="col-sm-10">
<input class="form-control" type="email" placeholder="E-mail" name="yourEmail" id="yourEmail">
</div>
</div>
<div class="clearfix">
<div class="form-group">
<?php osc_run_hook('user_register_form') ; ?>
</div>
<div class="clearfix">
<div class="input">
<div class="form-group">
<?php osc_show_recaptcha(); ?>
</div>
</div>
<div class="actions">
<button class="btn" type="submit"><?php _e('Send', 'twitter') ; ?></button>
<button class="btn btn-success btn-sm" type="submit"><?php _e('Send', 'twitter') ; ?></button>
</div>
</fieldset>
</form>
</div>
</div>
</div>
<script type="text/javascript">
var text_error_required = '<?php _e('This field is required', 'twitter') ; ?>' ;
Expand Down
Loading