← Back to team overview

team4alfanous team mailing list archive

[Branch ~team4alfanous/alfanous/alfanous-git] Rev 486: make the page keywords localizable and fix updating the share links

 

------------------------------------------------------------
revno: 486
committer: Assem Chelli <assem.ch@xxxxxxxxx>
timestamp: Sat 2013-01-05 18:08:08 +0100
message:
  make the page keywords localizable and fix updating the share links
modified:
  src/alfanous-django/templates/base.html
  src/alfanous-django/wui/static/js/hash.js
  src/alfanous-django/wui/views.py


--
lp:alfanous
https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git

Your team Alfanous team is subscribed to branch lp:alfanous.
To unsubscribe from this branch go to https://code.launchpad.net/~team4alfanous/alfanous/alfanous-git/+edit-subscription
=== modified file 'src/alfanous-django/templates/base.html'
--- src/alfanous-django/templates/base.html	2013-01-05 15:42:32 +0000
+++ src/alfanous-django/templates/base.html	2013-01-05 17:08:08 +0000
@@ -5,11 +5,10 @@
 <html>
 <head>
 	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
-
 	<title> {% block title %} {{ _("Alfanous - Advanced Quranic Search Engine") }} {% endblock %}  </title>
 	
-	<meta name="description" content="{{ _('Alfanous - Advanced search engine in  Holy Quran') }}"/>
-	<meta name="keywords" content="quran, search, ayates, surates, متقدم, advanced, الفانوس ,القرآن ,فانوس ,قرآني ,احصاءات ,ألفاظ, fanous, alfanous, alfanoos, fanoos, elfanous, elfanoos, alfanouce, alfanooce, fanooce , engine, محرك ,بحث ,قرآن"/>
+	<meta name="description" content="{{ _('Alfanous is a functional, dynamic, comprehensive Qur’an search engine that has been effectively designed to carry out simple or advanced Quranic searches.') }}"/>
+	<meta name="keywords" content="{{ _("quran") }}, {{ _("forqan") }}, {{ _("koran") }}, {{ _("search") }}, {{ _("search engine") }}, {{ _("ayates") }}, {{ _("surates") }}, {{ _("advanced") }}, {{ _("statistics") }}, {{  _("linguistic") }}, {{ _("information retrieval") }}, {{ _("natural language processing") }}, {{ _("words") }}, {{ _("Lantern") }}, {{ _("alfanous") }},  "/>
 	<!-- meta name="copyright" content="&copy; Alfanous Team, AGPL" -->
 	<meta name="author" content="Assem Chelli, Ahmed Ramadan, Abdellah Chelli, Mouad Debbar" />
 	<meta name="robots" content="index,follow"/>
@@ -73,13 +72,10 @@
 			$("#search_words").corner("30px");
 			$("#suggestions").corner("30px");
 			
-			$(document).scrollTop($("#search_result").position().top);
-			
-
-
-			// Mouad
-			read_params();
-			
+			$(document).scrollTop($("#search_result_static").position().top);
+			
+			update_share_links()
+
 			{% block JS_Embedding_AudioPlayers %}
 				{% for ayaresult_id, ayaresult_content in  	results.search.ayas.items %}
 					AudioPlayer.embed("audioplayer_{{ ayaresult_id }}", {soundFile: "{{  ayaresult_content.aya.recitation }}", titles: "{{ ayaresult_content.identifier.sura_name }}-{{ ayaresult_content.identifier.aya_id}}" });
@@ -251,9 +247,9 @@
 
 {% block  follow_box %}
 <div class="follow-box" > 
-	<a class="twitter_share" target='_blank' rel='nofollow' href='http://twitter.com/home?status=http://www.alfanous.org%20Alfanous%20|%20Advanced%20Quranic%20Search%20Engine'><img src='/static/images/twitter.png' class='bo' alt='twitter' title='{{ _("Twitter") }}'/></a><br/>
-	<a class="facebook_share" target='_blank' rel='nofollow' href='http://www.facebook.com/share.php?u=http://www.alfanous.org%26t=Alfanous%20|%20Advanced%20Quranic%20Search%20Engine'><img class='bo' alt='Facebook' title='{{ _("Facebook") }}' src='/static/images/facebook.png' /></a><br/>
-	<a title='{{ _("Send to MySpace") }}' class='external2 myspace_share' rel='nofollow' href='http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.alfanous.org' target='_blank'><img src='/static/images/myspace.png' class='bo' alt='myspace'/></a><br/>
+	<a class="twitter_share" target='_blank' rel='nofollow' href='https://twitter.com/share?url=http://www.alfanous.org{{ current_path }}&text={{ _("Alfanous | Advanced Quranic Search Engine")|iriencode }}'><img src='/static/images/twitter.png' class='bo' alt='twitter' title='{{ _("Twitter") }}'/></a><br/>
+	<a class="facebook_share" target='_blank' rel='nofollow' href='http://www.facebook.com/share.php?u=http://www.alfanous.org{{ current_path }}&t={{ _("Alfanous | Advanced Quranic Search Engine")|iriencode }}'><img class='bo' alt='Facebook' title='{{ _("Facebook") }}' src='/static/images/facebook.png' /></a><br/>
+	<a title='{{ _("Send to MySpace") }}' class='external2 myspace_share' rel='nofollow' href='http://www.myspace.com/Modules/PostTo/Pages/?u=http://www.alfanous.org{{ current_path }}' target='_blank'><img src='/static/images/myspace.png' class='bo' alt='myspace'/></a><br/>
 	<script type="text/javascript">
 	// <![CDATA[
 	    var addthis_pub = "kaan";

=== modified file 'src/alfanous-django/wui/static/js/hash.js'
--- src/alfanous-django/wui/static/js/hash.js	2013-01-05 15:42:32 +0000
+++ src/alfanous-django/wui/static/js/hash.js	2013-01-05 17:08:08 +0000
@@ -124,13 +124,11 @@
 	
 }
 
-
 function redirect_to_params ( params ) {
 	window.location = get_url_without_params () + "?" + build_params ( params );
 }
 
 
-
 function update_share_links () {
 	for ( var class_name in share_links ) {
 		$( ".follow-box a." + class_name ).attr ( "href", $.sprintf ( share_links[class_name], encodeURIComponent ( document.URL ), encodeURIComponent ( document.title ) ) );

=== modified file 'src/alfanous-django/wui/views.py'
--- src/alfanous-django/wui/views.py	2013-01-04 20:03:59 +0000
+++ src/alfanous-django/wui/views.py	2013-01-05 17:08:08 +0000
@@ -77,6 +77,7 @@
 
     return render_to_response( 'wui.html',
                               {
+                                'current_path': request.get_full_path(),
                                 "bidi": "rtl" if language_info['bidi']
                                               else "ltr",
                                 "language_local_name": language_info['name_local'],