Skip to content

Commit

Permalink
Update meta for better SEO
Browse files Browse the repository at this point in the history
  • Loading branch information
mucill committed Jun 5, 2015
1 parent 3502943 commit c5360c5
Show file tree
Hide file tree
Showing 15 changed files with 154 additions and 126 deletions.
3 changes: 2 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
}

// page title
$page_title = $sysconf['library_name'].' | '.$sysconf['library_subname'].' | OPAC';
$page_title = $sysconf['library_subname'].' | '.$sysconf['library_name'];

// default library info
$info = __('Web Online Public Access Catalog - Use the search options to find documents quickly');
// total opac result page
Expand Down
11 changes: 6 additions & 5 deletions lib/contents/librarian.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,19 @@
die("can not access this file directly");
}

$info = __('Profile of our Librarian');
$page_title = __('Librarian');
// $info = __('Profile of our Librarian');
$page_title = __('Profile of our Librarian') ;

// query librarian data
$librarian_q = $dbs->query('SELECT * FROM user WHERE user_type IN (1,2) ORDER BY user_type DESC LIMIT 20');
if ($librarian_q->num_rows > 0) {
while ($librarian = $librarian_q->fetch_assoc()) {
echo '<div class="row-fluid librarian">';
echo '<div class="span2">';
if ($librarian['user_image']) {
echo '<div class="librarian-image"><img src="'.SWB.'images/persons/'.$librarian['user_image'].'" /></div>';
echo '<div class="librarian-image"><img src="'.SWB.'images/persons/'.$librarian['user_image'].'" alt="'.$librarian['realname'].'" /></div>';
} else {
echo '<div><img src="'.SWB.'images/persons/person.png" /></div>';
echo '<div><img src="'.SWB.'images/persons/person.png" alt="'.$librarian['realname'].'" /></div>';
}
echo '</div>';
echo '<div class="span8">';
Expand All @@ -63,5 +64,5 @@
echo '</div>';
}
} else {
echo '<p>No Librarian data yet</p>';
echo '<p>No librarian data yet</p>';
}
2 changes: 1 addition & 1 deletion lib/contents/login.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@
$main_content = ob_get_clean();

// page title
$page_title = $sysconf['library_name'].' :: Library Automation LOGIN';
$page_title = __('Library Automation Login').' | '.$sysconf['library_name'];

if ($sysconf['template']['base'] == 'html') {
// create the template object
Expand Down
10 changes: 5 additions & 5 deletions lib/contents/peta.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
die("can not access this file directly");
}

$info = 'Library Location';
$lat= -6.2254549;
$long= 106.8023901;
$page_title = __('Library Location').' | '.$sysconf['library_name'];
$lat = -6.2254549;
$long = 106.8023901;

?>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title><?php echo $info; ?></title>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>
<title><?php echo $page_title; ?></title>
<script type="text/javascript" src="//maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(<?php echo $lat . ',' . $long; ?>);
Expand Down
17 changes: 14 additions & 3 deletions lib/contents/show_detail.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
// create detail object
$detail = new detail($dbs, $detail_id);
$detail->setTemplate($sysconf['template']['dir'].'/'.$sysconf['template']['theme'].'/detail_template.php');

// set the content for info box
$info = '<strong>'.strtoupper(__('Record Detail')).'</strong><hr />';
if (!defined('LIGHTWEIGHT_MODE')) {
Expand All @@ -110,11 +111,21 @@
$info .= '<a href="index.php?p=show_detail&inXML=true&id='.$detail_id.'" class="xmlDetailLink s-xml-detail" title="Show detail in XML format" target="_blank">XML Detail</a>';
$info .= '<a href="index.php?p=cite&id='.$detail_id.'" class="openPopUp citationLink" title="Citation for: '.substr($detail->record_title, 0, 50).'" target="_blank">Cite this</a>';
}

// output the record detail
echo $detail->showDetail();
$page_title = $detail->record_title;
$metadata = $detail->metadata;
$image_src = $detail->image_src;
$page_title = $detail->record_title.' | '.$sysconf['library_name'];
$metadata = $detail->metadata;
$image_src = $detail->image_src;
$notes = $detail->notes;

// get keywords
$subject = '';
if(count($detail->subjects[0]) > 0) {
foreach($detail->subjects as $_subject) {
$subject .= strtolower($_subject['topic']).',';
}
$subject = substr($subject,0,-1);
}
echo '<br />'."\n";
}
8 changes: 6 additions & 2 deletions lib/detail.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class detail
public $record_title;
public $metadata;
public $image_src;
public $notes;
public $subjects;

/**
* Class Constructor
Expand All @@ -65,6 +67,8 @@ public function __construct($dbs, $int_detail_id, $str_output_format = 'html')
$this->biblio = new Biblio($this->db, $int_detail_id);
$this->record_detail = $this->biblio->detail();
$this->record_title = $this->record_detail['title'];
$this->notes = $this->record_detail['notes'];
$this->subjects = $this->record_detail['subjects'];
}


Expand Down Expand Up @@ -268,11 +272,11 @@ protected function htmlOutput()
if (!empty($this->record_detail['image'])) {
if ($sysconf['tg']['type'] == 'minigalnano') {
$this->record_detail['image_src'] = 'lib/minigalnano/createthumb.php?filename='.$sysconf['tg']['relative_url'].'images/docs/'.urlencode($this->record_detail['image']).'&amp;width=200';
$this->record_detail['image'] = '<img itemprop="image" alt="'.sprintf('Image of %s', $this->record_title).'" src="./'.$this->record_detail['image_src'].'" border="0" />';
$this->record_detail['image'] = '<img itemprop="image" alt="'.sprintf('Image of %s', $this->record_title).'" src="./'.$this->record_detail['image_src'].'" border="0" alt="'.$this->record_detail['title'].'" />';
}
} else {
$this->record_detail['image_src'] = "images/default/image.png";
$this->record_detail['image'] = '<img src="./'.$this->record_detail['image_src'].'" alt="No image available for this title" border="0" />';
$this->record_detail['image'] = '<img src="./'.$this->record_detail['image_src'].'" alt="No image available for this title" border="0" alt="'.$this->record_detail['title'].'" />';
}

// get image source
Expand Down
17 changes: 9 additions & 8 deletions template/default/biblio_list_template.php
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
<?php
/**
*
* Template for bibliogrphic data listing
* Name of callback function MUST BE biblio_list_format
* Template for Biblio List
* name of memberID text field must be: memberID
* name of institution text field must be: institution
*
* Copyright (C) 2015 Arie Nugraha ([email protected])
* Modified by Eddy Subratha ([email protected])
*
* Create by Eddy Subratha ([email protected])
*
* Slims 8 (Akasia)
*
* 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 3 of the License, or
Expand All @@ -20,7 +22,6 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
*/

$label_cache = array();
Expand Down Expand Up @@ -71,7 +72,7 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret
}

if (isset($label[1]) && $label[1]) {
$title_link .= ' <a href="'.$label[1].'" target="_blank"><img src="'.SWB.IMAGES_DIR.'/labels/'.$label_cache[$label[0]]['image'].'" title="'.$label_cache[$label[0]]['desc'].'" alt="'.$label_cache[$label[0]]['desc'].'" align="middle" class="labels" border="0" /></a>';
$title_link .= ' <a itemprop="name" property="name" href="'.$label[1].'" target="_blank"><img src="'.SWB.IMAGES_DIR.'/labels/'.$label_cache[$label[0]]['image'].'" title="'.$label_cache[$label[0]]['desc'].'" alt="'.$label_cache[$label[0]]['desc'].'" align="middle" class="labels" border="0" /></a>';
} else {
$title_link .= ' <img src="'.SWB.IMG.'/labels/'.$label_cache[$label[0]]['image'].'" title="'.$label_cache[$label[0]]['desc'].'" alt="'.$label_cache[$label[0]]['desc'].'" align="middle" class="labels" />';
}
Expand All @@ -96,7 +97,7 @@ function biblio_list_format($dbs, $biblio_detail, $n, $settings = array(), &$ret
$images_loc = '../../images/docs/'.$biblio_detail['image'];
if ($sysconf['tg']['type'] == 'minigalnano') {
$thumb_url = './lib/minigalnano/createthumb.php?filename='.urlencode($images_loc).'&width=120';
$image_cover = '<img src="'.$thumb_url.'" class="img-thumbnail" itemprop="image" />';
$image_cover = '<img src="'.$thumb_url.'" class="img-thumbnail" itemprop="image" alt="'.$title.'" />';
}
}

Expand Down
2 changes: 1 addition & 1 deletion template/default/custom_frontpage_record.inc.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php
/**
* Custom OPAC record list items
* Change "0" value to "1" to enable field
*/
// change "0" value to "1" to enable field
$custom_fields['edition'] = array(0, __('Edition'));
$custom_fields['isbn_issn'] = array(0, __('ISBN/ISSN'));
$custom_fields['collation'] = array(0, __('Collation'));
Expand Down
102 changes: 47 additions & 55 deletions template/default/index_template.inc.php
Original file line number Diff line number Diff line change
@@ -1,25 +1,26 @@
<?php
/*------------------------------------------------------------
Template : Slims Akasia Template
Create Date : April, 2015
Author : Eddy Subratha (eddy.subratha{at}slims.web.id)
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 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-------------------------------------------------------------*/
/**
* Template for OPAC
*
* Copyright (C) 2015 Arie Nugraha ([email protected])
* Create by Eddy Subratha ([email protected])
*
* Slims 8 (Akasia)
*
* 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 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/

// be sure that this file not accessed directly

Expand All @@ -43,10 +44,8 @@
<html lang="<?php echo substr($sysconf['default_lang'], 0, 2); ?>" xmlns="http://www.w3.org/1999/xhtml" prefix="og: http://ogp.me/ns#">
<head>


<?php
<?php
// Meta Template
// =============================================
include "partials/meta.php";
?>

Expand All @@ -60,19 +59,17 @@

<?php
// Header
// =============================================
include "partials/header.php";
?>

<?php
// Navigation
// =============================================
include "partials/nav.php";
?>

<?php
// Content
// ============================================= ?>
?>
<?php if(isset($_GET['search']) || isset($_GET['p'])): ?>
<main id="content" class="s-main-page" role="main">

Expand Down Expand Up @@ -207,13 +204,11 @@

<?php
// Footer
// =============================================
include "partials/footer.php";
?>

<?php
// Chat
// =============================================
if($sysconf['chat_system']['enabled']) :
?>
<a href="#" id="pchat-toggle" class="animated fadeInUp delay3"><i class="fa fa-comment-o"></i></a>
Expand All @@ -228,7 +223,6 @@
</aside>

<script>
// $.get('./chat_server.php', {}, function(){});
var Server;
function log( text ) {
$log = $('#log');
Expand Down Expand Up @@ -279,7 +273,6 @@ function send( text ) {

<?php
// Background
// =============================================
include "partials/bg.php";
?>

Expand All @@ -303,33 +296,32 @@ function send( text ) {
$(this).attr('src','./template/default/img/avatar.jpg');
});

// Feature list slider
// ============================================
function mycarousel_initCallback(carousel)
{
// Disable autoscrolling if the user clicks the prev or next button.
carousel.buttonNext.bind('click', function() {
carousel.startAuto(0);
});
//Feature list slider
function mycarousel_initCallback(carousel)
{
// Disable autoscrolling if the user clicks the prev or next button.
carousel.buttonNext.bind('click', function() {
carousel.startAuto(0);
});

carousel.buttonPrev.bind('click', function() {
carousel.startAuto(0);
});
carousel.buttonPrev.bind('click', function() {
carousel.startAuto(0);
});

// Pause autoscrolling if the user moves with the cursor over the clip.
carousel.clip.hover(function() {
carousel.stopAuto();
}, function() {
carousel.startAuto();
});
};

// Pause autoscrolling if the user moves with the cursor over the clip.
carousel.clip.hover(function() {
carousel.stopAuto();
}, function() {
carousel.startAuto();
jQuery('#topbook').jcarousel({
auto: 5,
wrap: 'last',
initCallback: mycarousel_initCallback
});
};

jQuery('#topbook').jcarousel({
auto: 5,
wrap: 'last',
initCallback: mycarousel_initCallback
});


</script>

</body>
Expand Down
Loading

0 comments on commit c5360c5

Please sign in to comment.