From oi-commits at pardus.org.tr Sat Mar 1 07:06:23 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 1 Mar 2008 07:06:23 +0200 (EET) Subject: [Oi-commits] r1103 - in trunk: st/templatetags templates/petition Message-ID: <20080301050628.677117C038B@liste.uludag.org.tr> Author: jnmbk Date: Sat Mar 1 07:06:07 2008 New Revision: 1103 Modified: trunk/st/templatetags/library.py trunk/templates/petition/petitioner_list.html trunk/templates/petition/sign.html Log: I see that django already had it Modified: trunk/st/templatetags/library.py ================================================================= --- trunk/st/templatetags/library.py (original) +++ trunk/st/templatetags/library.py Sat Mar 1 07:06:07 2008 @@ -4,7 +4,7 @@ from datetime import datetime from django.template import Library from django.utils.timesince import timesince -from oi.settings import MEDIA_ROOT, MEDIA_URL, CITY_LIST +from oi.settings import MEDIA_ROOT, MEDIA_URL register = Library() @@ -65,17 +65,3 @@ return "%s sonra" % timesince(cmp,value) else: return "%s ?nce" % timesince(value,cmp) - - at register.filter -def cityname(value, arg=None): - # binary search the city name - i = 0 - j = len(CITY_LIST) - k = (i + j) / 2 - while i < j: - k = (i + j) / 2 - if value > CITY_LIST[k][0]: - i = k + 1 - else: - j = k - return CITY_LIST[i][1] Modified: trunk/templates/petition/petitioner_list.html ================================================================= --- trunk/templates/petition/petitioner_list.html (original) +++ trunk/templates/petition/petitioner_list.html Sat Mar 1 07:06:07 2008 @@ -20,7 +20,7 @@ {% endif %} {% for petitioner in petitioner_list %} {% endfor %} {% if is_paginated %} Modified: trunk/templates/petition/sign.html ================================================================= --- trunk/templates/petition/sign.html (original) +++ trunk/templates/petition/sign.html Sat Mar 1 07:06:07 2008 @@ -36,7 +36,7 @@ Son 20 imza: {% for petitioner in petitioners %} {% endfor %} T?m ?mzalar From oi-commits at pardus.org.tr Sat Mar 1 13:59:49 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 1 Mar 2008 13:59:49 +0200 (EET) Subject: [Oi-commits] Best Sales 2008! Message-ID: <20080301020004.5728.qmail@ibm> An HTML attachment was scrubbed... URL: http://liste.pardus.org.tr/oi-commits/attachments/20080301/03ca6d44/attachment-0001.htm From oi-commits at pardus.org.tr Mon Mar 3 20:57:24 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Mon, 3 Mar 2008 20:57:24 +0200 (EET) Subject: [Oi-commits] r1104 - trunk/profile Message-ID: <20080303185724.D47DB7C0129@liste.uludag.org.tr> Author: erenturkay Date: Mon Mar 3 20:57:24 2008 New Revision: 1104 Modified: trunk/profile/views.py Log: email_to should be array, otherwise, it cant be delivered :) Modified: trunk/profile/views.py ================================================================= --- trunk/profile/views.py (original) +++ trunk/profile/views.py Mon Mar 3 20:57:24 2008 @@ -181,7 +181,7 @@ %(link)s""" email_to = form.cleaned_data['email'] - send_mail(email_subject, email_body % email_dict, DEFAULT_FROM_EMAIL, email_to, fail_silently=True) + send_mail(email_subject, email_body % email_dict, DEFAULT_FROM_EMAIL, [email_to], fail_silently=True) return render_response(request, 'user/lostpassword_done.html') else: return render_response(request, 'user/lostpassword.html', {'form': form}) From oi-commits at pardus.org.tr Wed Mar 5 13:33:00 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 5 Mar 2008 13:33:00 +0200 (EET) Subject: [Oi-commits] r1105 - trunk/templates/news Message-ID: <20080305113300.B5A5E7C02EE@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 5 13:33:00 2008 New Revision: 1105 Modified: trunk/templates/news/news_main.html Log: cosmetics Modified: trunk/templates/news/news_main.html ================================================================= --- trunk/templates/news/news_main.html (original) +++ trunk/templates/news/news_main.html Wed Mar 5 13:33:00 2008 @@ -8,14 +8,11 @@ {% block section %}news{% endblock %} {% block header_menu %} - - {% include "header.html" %} + {% include "header.html" %} {% endblock %}
{% block ust_menu %} - - {% include "ust_menu_ayrinti.html" %} - + {% include "ust_menu_ayrinti.html" %} {% endblock %}
@@ -46,11 +43,11 @@ From oi-commits at pardus.org.tr Wed Mar 5 14:53:18 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 5 Mar 2008 14:53:18 +0200 (EET) Subject: [Oi-commits] r1106 - in trunk: forum media/css templates/forum Message-ID: <20080305125318.84F3A7C008B@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 5 14:53:18 2008 New Revision: 1106 Modified: trunk/forum/views.py trunk/media/css/forum.css trunk/templates/forum/topic.html Log: show latest three news under first post of the topic Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Wed Mar 5 14:53:18 2008 @@ -20,7 +20,7 @@ from oi.forum.models import Category, Forum, Topic, Post, AbuseReport, WatchList from django.core.urlresolvers import reverse -from oi.st.models import Tag +from oi.st.models import Tag, News def main(request): categories = Category.objects.order_by('order') @@ -51,6 +51,7 @@ forum = get_object_or_404(Forum, slug=forum_slug) topic = get_object_or_404(Topic, pk=topic_id) posts = topic.post_set.all().order_by('created') + news_list = News.objects.filter(status=1).order_by('-update')[:3] session_key = 'visited_'+topic_id @@ -63,7 +64,7 @@ return object_list(request, posts, template_name = 'forum/topic.html', template_object_name = 'post', - extra_context = {'forum': forum, 'topic': topic, 'request': request}, + extra_context = {'forum': forum, 'topic': topic, 'news_list':news_list, 'request': request}, paginate_by = POSTS_PER_PAGE, allow_empty = True) Modified: trunk/media/css/forum.css ================================================================= --- trunk/media/css/forum.css (original) +++ trunk/media/css/forum.css Wed Mar 5 14:53:18 2008 @@ -214,6 +214,32 @@ .tag { padding-left: 5px; } +div.topic_news_area { + width: 100%; + overflow: hidden; +} +div.topic_news_box { + float: left; + width: 290px; + height: 200px; + border-width: 0px 1px; + border-style: solid; + border-color: #D7E1E7; + padding: 0px 4px; +} +div.topic_news_box:hover { + background-color: #D7E1E7; +} +div.topic_news_box h2 { + font-size: 14px; + font-weight: bold; +} +div.topic_news_box a:hover, +div.topic_news_box a:visited, +div.topic_news_box a { + color: black; + text-decoration: none; +} /* Ends here */ Modified: trunk/templates/forum/topic.html ================================================================= --- trunk/templates/forum/topic.html (original) +++ trunk/templates/forum/topic.html Wed Mar 5 14:53:18 2008 @@ -96,6 +96,15 @@ {% endif %} +{% if forloop.first %} +
+ {% for news in news_list %} +
+

{{ news.title }}

{{ news.sum }}
+
+ {% endfor %} +
+{% endif %} {% endfor %}
From oi-commits at pardus.org.tr Wed Mar 5 15:34:29 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 5 Mar 2008 15:34:29 +0200 (EET) Subject: [Oi-commits] r1107 - trunk/media/css Message-ID: <20080305133429.499197C0177@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 5 15:34:29 2008 New Revision: 1107 Modified: trunk/media/css/forum.css Log: added bottom border so it looks better when only one post exists Modified: trunk/media/css/forum.css ================================================================= --- trunk/media/css/forum.css (original) +++ trunk/media/css/forum.css Wed Mar 5 15:34:29 2008 @@ -217,6 +217,7 @@ div.topic_news_area { width: 100%; overflow: hidden; + border-bottom: 5px solid #6A91A6; } div.topic_news_box { float: left; From oi-commits at pardus.org.tr Wed Mar 5 15:48:18 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 5 Mar 2008 15:48:18 +0200 (EET) Subject: [Oi-commits] r1108 - in trunk/media: css dijital/img/forum Message-ID: <20080305134818.C8C227C02A2@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 5 15:48:18 2008 New Revision: 1108 Added: trunk/media/dijital/img/forum/stats.gif (contents, props changed) Modified: trunk/media/css/forum.css Log: stats icon Modified: trunk/media/css/forum.css ================================================================= --- trunk/media/css/forum.css (original) +++ trunk/media/css/forum.css Wed Mar 5 15:48:18 2008 @@ -371,7 +371,10 @@ #forum_stats_left { float: left; width: 40%; - padding: 10px; + padding: 10px 10px 10px 45px; + background-image: url(/media/dijital/img/forum/stats.gif); + background-repeat: no-repeat; + background-position: center left; } #forum_stats_right { float:right; From oi-commits at pardus.org.tr Wed Mar 5 17:12:11 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 5 Mar 2008 17:12:11 +0200 (EET) Subject: [Oi-commits] r1109 - in trunk: st templates/fs templates/game templates/howto templates/news templates/package Message-ID: <20080305151211.E3E917C014A@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 5 17:12:11 2008 New Revision: 1109 Modified: trunk/st/views.py trunk/templates/fs/fs_detail.html trunk/templates/game/game_detail.html trunk/templates/howto/howto_detail.html trunk/templates/news/news_detail.html trunk/templates/package/package_detail.html Log: show total number of comments and link to forum (a refactor is needed in comment system to avoid try except blocks here) Modified: trunk/st/views.py ================================================================= --- trunk/st/views.py (original) +++ trunk/st/views.py Wed Mar 5 17:12:11 2008 @@ -53,6 +53,12 @@ if request.user.is_authenticated(): auth=True + try: + topic = Topic.objects.filter(title=howto.title)[0] + comment_count = topic.posts - 1 + comment_url = topic.get_latest_post_url() + except: + pass numberofpetitioners = Petitioner.objects.filter(is_active=True).count() petitionpercent = numberofpetitioners / 30 return render_response(request, 'howto/howto_detail.html', locals()) @@ -70,6 +76,13 @@ if request.user.is_authenticated(): auth=True + try: + topic = Topic.objects.filter(title=game.title)[0] + comment_count = topic.posts - 1 + comment_url = topic.get_latest_post_url() + except: + pass + return render_response(request, 'game/game_detail.html', locals()) def game_printable(request, slug): @@ -83,6 +96,12 @@ if request.user.is_authenticated(): auth=True + try: + topic = Topic.objects.filter(title=news.title)[0] + comment_count = topic.posts - 1 + comment_url = topic.get_latest_post_url() + except: + pass numberofpetitioners = Petitioner.objects.filter(is_active=True).count() petitionpercent = numberofpetitioners / 30 return render_response(request, 'news/news_detail.html', locals()) @@ -100,6 +119,14 @@ if request.user.is_authenticated(): auth=True + # we need to handle page titles that changed after creating + try: + topic = Topic.objects.filter(title=package.title)[0] + comment_count = topic.posts - 1 + comment_url = topic.get_latest_post_url() + except: + pass + return render_response(request, 'package/package_detail.html', locals()) def pkg_printable(request, slug): @@ -209,7 +236,7 @@ tags = news.tags.all() return render_response(request,'news/news_detail.html',{'news':news,'tags':tags,'form':form,'auth':True}) - form=CommentForm() + form = CommentForm() tags = news.tags.all() return render_response(request,'news/news_detail.html',{'news':news,'tags':tags,'form':form,'auth':True}) Modified: trunk/templates/fs/fs_detail.html ================================================================= --- trunk/templates/fs/fs_detail.html (original) +++ trunk/templates/fs/fs_detail.html Wed Mar 5 17:12:11 2008 @@ -13,14 +13,11 @@ {% block section %}fs{% endblock %} {% block header_menu %} - - {% include "header.html" %} + {% include "header.html" %} {% endblock %}
{% block ust_menu %} - - {% include "ust_menu_ayrinti.html" %} - + {% include "ust_menu_ayrinti.html" %} {% endblock %}
Modified: trunk/templates/game/game_detail.html ================================================================= --- trunk/templates/game/game_detail.html (original) +++ trunk/templates/game/game_detail.html Wed Mar 5 17:12:11 2008 @@ -15,14 +15,11 @@ {% block section %}game{% endblock %} {% block header_menu %} - - {% include "header.html" %} + {% include "header.html" %} {% endblock %}
{% block ust_menu %} - - {% include "ust_menu_ayrinti.html" %} - + {% include "ust_menu_ayrinti.html" %} {% endblock %}
@@ -32,16 +29,17 @@
{{ game.text }}
- {% if auth %} - {% if form %} -
- - {{form}}
- -
- {% endif %} - - {% endif %} +{% if auth %} + {% if form %} +
+ {{form}} +
+ +
+ Yorumlar ({{ comment_count }}) +
+ {% endif %} +{% endif %}
Son g?ncelleme: {{ game.update|timedelta }}
Modified: trunk/templates/howto/howto_detail.html ================================================================= --- trunk/templates/howto/howto_detail.html (original) +++ trunk/templates/howto/howto_detail.html Wed Mar 5 17:12:11 2008 @@ -31,15 +31,17 @@
{{ howto.text }}
- {% if auth %} - {% if form %} -
- - {{form}}
- -
- {% endif %} - {% endif %} +{% if auth %} + {% if form %} +
+ {{form}} +
+ +
+ Yorumlar ({{ comment_count }}) +
+ {% endif %} +{% endif %}
Son g?ncelleme: {{ howto.update|timedelta }}
Modified: trunk/templates/news/news_detail.html ================================================================= --- trunk/templates/news/news_detail.html (original) +++ trunk/templates/news/news_detail.html Wed Mar 5 17:12:11 2008 @@ -14,14 +14,11 @@ {% block section %}news{% endblock %} {% block header_menu %} - - {% include "header.html" %} + {% include "header.html" %} {% endblock %}
{% block ust_menu %} - - {% include "ust_menu_ayrinti.html" %} - + {% include "ust_menu_ayrinti.html" %} {% endblock %}
@@ -32,16 +29,17 @@ {{ news.text }}
- {% if auth %} - {% if form %} -
- - {{form}} -
- -
- {% endif %} - {% endif %} +{% if auth %} + {% if form %} +
+ {{form}} +
+ +
+ Yorumlar ({{ comment_count }}) +
+ {% endif %} +{% endif %}
Son g?ncelleme: {{ news.update|timedelta }}
Modified: trunk/templates/package/package_detail.html ================================================================= --- trunk/templates/package/package_detail.html (original) +++ trunk/templates/package/package_detail.html Wed Mar 5 17:12:11 2008 @@ -15,14 +15,11 @@ {% block section %}package{% endblock %} {% block header_menu %} - - {% include "header.html" %} + {% include "header.html" %} {% endblock %}
{% block ust_menu %} - - {% include "ust_menu_ayrinti.html" %} - + {% include "ust_menu_ayrinti.html" %} {% endblock %}
@@ -32,15 +29,17 @@ {{ package.text }} - {% if auth %} - {% if form %} -
- - {{form}}
- -
- {% endif %} - {% endif %} +{% if auth %} + {% if form %} +
+ {{form}} +
+ +
+ Yorumlar ({{ comment_count }}) +
+ {% endif %} +{% endif %}
Son g?ncelleme: {{ package.update|timedelta }}
From oi-commits at pardus.org.tr Wed Mar 5 17:59:35 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 5 Mar 2008 17:59:35 +0200 (EET) Subject: [Oi-commits] r1110 - trunk/forum Message-ID: <20080305155935.E0F1F7C014A@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 5 17:59:35 2008 New Revision: 1110 Modified: trunk/forum/forms.py trunk/forum/models.py Log: first post's edit goes to topic edit (but it needs editing support for tags) Modified: trunk/forum/forms.py ================================================================= --- trunk/forum/forms.py (original) +++ trunk/forum/forms.py Wed Mar 5 17:59:35 2008 @@ -27,7 +27,7 @@ def clean_tags(self): field_data = self.cleaned_data['tags'] - # we don't want users to choice tags more than 5 + # we don't want users to choose more than 5 tags if len(field_data) > 5: raise forms.ValidationError("En fazla 5 tag se?ebilirsiniz. L?tfen a?t???n?z ba?l??a uygun tag se?in") Modified: trunk/forum/models.py ================================================================= --- trunk/forum/models.py (original) +++ trunk/forum/models.py Wed Mar 5 17:59:35 2008 @@ -59,7 +59,11 @@ return '/forum/%s/%s/quote/%s/' % (self.topic.forum.slug, self.topic.id, self.id) def get_edit_url(self): - return '/forum/%s/%s/edit/%s/' % (self.topic.forum.slug, self.topic.id, self.id) + """ returns topic edit url if it's first post """ + if self.topic.post_set.order_by("created")[0].id == self.id: + return '/forum/%s/%s/edit/' % (self.topic.forum.slug, self.topic.id) + else: + return '/forum/%s/%s/edit/%s/' % (self.topic.forum.slug, self.topic.id, self.id) def get_hide_url(self): return '/forum/%s/%s/hide/%s/' % (self.topic.forum.slug, self.topic.id, self.id) From oi-commits at pardus.org.tr Wed Mar 5 18:09:17 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 5 Mar 2008 18:09:17 +0200 (EET) Subject: [Oi-commits] r1111 - trunk/forum Message-ID: <20080305160918.022367C014A@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 5 18:09:17 2008 New Revision: 1111 Modified: trunk/forum/views.py Log: it's not wrong way when user is the author of first post Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Wed Mar 5 18:09:17 2008 @@ -179,7 +179,7 @@ topic = get_object_or_404(Topic, pk=topic_id) first_post = topic.post_set.order_by('created')[0] - if not request.user.has_perm('forum.change_topic'): + if not request.user.has_perm('forum.change_topic') and not first_post.author == request.user: return HttpResponse('Opps, wrong way :)') if forum.locked or topic.locked: From oi-commits at pardus.org.tr Fri Mar 7 15:02:41 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 7 Mar 2008 15:02:41 +0200 (EET) Subject: [Oi-commits] r1112 - in trunk: forum templates/forum Message-ID: <20080307130241.E1CB57C033D@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 7 15:02:41 2008 New Revision: 1112 Modified: trunk/forum/models.py trunk/forum/views.py trunk/templates/forum/topic.html Log: better way of editing topic and permission fixes Modified: trunk/forum/models.py ================================================================= --- trunk/forum/models.py (original) +++ trunk/forum/models.py Fri Mar 7 15:02:41 2008 @@ -59,11 +59,8 @@ return '/forum/%s/%s/quote/%s/' % (self.topic.forum.slug, self.topic.id, self.id) def get_edit_url(self): - """ returns topic edit url if it's first post """ - if self.topic.post_set.order_by("created")[0].id == self.id: - return '/forum/%s/%s/edit/' % (self.topic.forum.slug, self.topic.id) - else: - return '/forum/%s/%s/edit/%s/' % (self.topic.forum.slug, self.topic.id, self.id) + """ returns topic edit url of the post """ + return '/forum/%s/%s/edit/%s/' % (self.topic.forum.slug, self.topic.id, self.id) def get_hide_url(self): return '/forum/%s/%s/hide/%s/' % (self.topic.forum.slug, self.topic.id, self.id) @@ -85,6 +82,7 @@ ("can_see_post_ip", "Can see author ip"), ("can_hide_post", "Can hide"), ("can_see_hidden_posts", "Can see hidden posts"), + ("can_edit_post", "Can edit post"), ) def save(self): @@ -195,6 +193,7 @@ ("can_tag_topic", "Can tag topic"), ("can_see_hidden_topics", "Can see hidden topics"), ("can_merge_topic", "Can merge topic"), + ("can_edit_topic", "Can edit topic"), ) def save(self): Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Fri Mar 7 15:02:41 2008 @@ -179,7 +179,7 @@ topic = get_object_or_404(Topic, pk=topic_id) first_post = topic.post_set.order_by('created')[0] - if not request.user.has_perm('forum.change_topic') and not first_post.author == request.user: + if not request.user.has_perm('forum.change_topic'): return HttpResponse('Opps, wrong way :)') if forum.locked or topic.locked: Modified: trunk/templates/forum/topic.html ================================================================= --- trunk/templates/forum/topic.html (original) +++ trunk/templates/forum/topic.html Fri Mar 7 15:02:41 2008 @@ -39,7 +39,12 @@
{{ post.created|date:"d-m-Y H:i" }}
- {% if perms.forum.change_post %} + {% if perms.forum.can_edit_topic %} +
+ edit_topic +
+ {% endif %} + {% if perms.forum.can_edit_post %}
From oi-commits at pardus.org.tr Fri Mar 7 18:52:27 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 7 Mar 2008 18:52:27 +0200 (EET) Subject: [Oi-commits] r1113 - in trunk: forum templates/forum Message-ID: <20080307165227.506D37C02E5@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 7 18:52:27 2008 New Revision: 1113 Modified: trunk/forum/models.py trunk/templates/forum/topic.html Log: django already had it :P Modified: trunk/forum/models.py ================================================================= --- trunk/forum/models.py (original) +++ trunk/forum/models.py Fri Mar 7 18:52:27 2008 @@ -82,7 +82,6 @@ ("can_see_post_ip", "Can see author ip"), ("can_hide_post", "Can hide"), ("can_see_hidden_posts", "Can see hidden posts"), - ("can_edit_post", "Can edit post"), ) def save(self): @@ -193,7 +192,6 @@ ("can_tag_topic", "Can tag topic"), ("can_see_hidden_topics", "Can see hidden topics"), ("can_merge_topic", "Can merge topic"), - ("can_edit_topic", "Can edit topic"), ) def save(self): Modified: trunk/templates/forum/topic.html ================================================================= --- trunk/templates/forum/topic.html (original) +++ trunk/templates/forum/topic.html Fri Mar 7 18:52:27 2008 @@ -39,12 +39,12 @@
{{ post.created|date:"d-m-Y H:i" }}
- {% if perms.forum.can_edit_topic %} + {% if perms.forum.change_topic %}
edit_topic
{% endif %} - {% if perms.forum.can_edit_post %} + {% if perms.forum.change_post %}
From oi-commits at pardus.org.tr Sat Mar 8 15:20:14 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 8 Mar 2008 15:20:14 +0200 (EET) Subject: [Oi-commits] r1114 - trunk/templates/forum Message-ID: <20080308132014.EEE587C00D0@liste.uludag.org.tr> Author: jnmbk Date: Sat Mar 8 15:20:14 2008 New Revision: 1114 Modified: trunk/templates/forum/topic.html Log: put edit-topic button at the end Modified: trunk/templates/forum/topic.html ================================================================= --- trunk/templates/forum/topic.html (original) +++ trunk/templates/forum/topic.html Sat Mar 8 15:20:14 2008 @@ -39,11 +39,6 @@
{{ post.created|date:"d-m-Y H:i" }}
- {% if perms.forum.change_topic %} -
- edit_topic -
- {% endif %} {% if perms.forum.change_post %}
@@ -137,6 +132,9 @@ {% if perms.forum.can_lock_topic and not topic.locked %}
{% endif %} + {% if perms.forum.change_topic %} +
edit_topic
+ {% endif %} {% if is_paginated %}
{% paginator %}
{% endif %} From oi-commits at pardus.org.tr Sat Mar 8 16:31:58 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 8 Mar 2008 16:31:58 +0200 (EET) Subject: [Oi-commits] r1115 - in trunk: . st templates Message-ID: <20080308143158.E0D0E7C011A@liste.uludag.org.tr> Author: ahmet Date: Sat Mar 8 16:31:58 2008 New Revision: 1115 Added: trunk/templates/robots.txt Modified: trunk/st/views.py trunk/urls.py Log: Robots Modified: trunk/st/views.py ================================================================= --- trunk/st/views.py (original) +++ trunk/st/views.py Sat Mar 8 16:31:58 2008 @@ -26,6 +26,9 @@ from oi.forum.views import flood_control from django.http import HttpResponseRedirect +def robots(request): + return render_response(request, 'robots.txt') + def home(request): news = News.objects.filter(status=1).order_by('-update')[:NEWS_IN_HOMEPAGE] packages = Package.objects.filter(status=1).order_by('-update')[:PACKAGES_IN_HOMEPAGE] Modified: trunk/urls.py ================================================================= --- trunk/urls.py (original) +++ trunk/urls.py Sat Mar 8 16:31:58 2008 @@ -98,6 +98,8 @@ urlpatterns = patterns('', + (r'^robots.txt$', 'oi.st.views.robots'), + #comments (r'^comments/post/$', 'oi.comments.views.post_comment'), From oi-commits at pardus.org.tr Sat Mar 8 16:35:44 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 8 Mar 2008 16:35:44 +0200 (EET) Subject: [Oi-commits] r1116 - trunk/templates Message-ID: <20080308143544.2EAB67C0102@liste.uludag.org.tr> Author: ahmet Date: Sat Mar 8 16:35:43 2008 New Revision: 1116 Modified: trunk/templates/robots.txt Log: up2date Modified: trunk/templates/robots.txt ================================================================= --- trunk/templates/robots.txt (original) +++ trunk/templates/robots.txt Sat Mar 8 16:35:43 2008 @@ -1,2 +1,4 @@ -User-agent: * -Disallow: / +User-agent: * +Disallow: /admin/ +Disallow: /media/upload/video/ + From oi-commits at pardus.org.tr Sat Mar 8 18:52:00 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 8 Mar 2008 18:52:00 +0200 (EET) Subject: [Oi-commits] r1117 - in trunk: . forum templates/forum Message-ID: <20080308165200.D1F0A7C00A7@liste.uludag.org.tr> Author: ahmet Date: Sat Mar 8 18:52:00 2008 New Revision: 1117 Modified: trunk/forum/views.py trunk/settings.py trunk/templates/forum/forum_detail.html Log: Yeni mesajlar filtresi... Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sat Mar 8 18:52:00 2008 @@ -23,6 +23,8 @@ from oi.st.models import Tag, News def main(request): + lastvisit_control(request) + categories = Category.objects.order_by('order') forums = topics = posts = 0 for category in categories: @@ -30,6 +32,11 @@ forums += 1 topics += forum.topics posts += forum.posts + if forum.forum_latest_post.edited > request.session['last_visit']: + forum.is_unread = True + else: + forum.is_unread = False + usercount = User.objects.count() currentdate = datetime.now() latest_posts = Post.objects.filter(hidden=False).order_by("-created")[:5] @@ -37,9 +44,17 @@ return render_response(request, 'forum/forum_list.html', locals()) def forum(request, forum_slug): + lastvisit_control(request) + forum = get_object_or_404(Forum, slug=forum_slug) topics = forum.topic_set.all().order_by('-sticky', '-topic_latest_post') + for topic in topics: + if topic.topic_latest_post.edited > request.session['last_visit']: + topic.is_unread = True + else: + topic.is_unread = False + return object_list(request, topics, template_name = 'forum/forum_detail.html', template_object_name = 'topic', @@ -48,6 +63,8 @@ allow_empty = True) def topic(request, forum_slug, topic_id): + lastvisit_control(request) + forum = get_object_or_404(Forum, slug=forum_slug) topic = get_object_or_404(Topic, pk=topic_id) posts = topic.post_set.all().order_by('created') @@ -326,6 +343,10 @@ return flood,timeout +def lastvisit_control(request): + if not 'last_visit' in request.session: + request.session['last_visit'] = datetime.now() + def delete_post(request,forum_slug,topic_id, post_id): """ The delete part should be controlled better !""" forum = get_object_or_404(Forum, slug=forum_slug) Modified: trunk/settings.py ================================================================= --- trunk/settings.py (original) +++ trunk/settings.py Sat Mar 8 18:52:00 2008 @@ -76,7 +76,7 @@ 'django.template.loaders.app_directories.load_template_source', ) -TEMPLATE_CONTEXT_PROCESSORS = ("oi.context_processors.testing","django.core.context_processors.auth") +TEMPLATE_CONTEXT_PROCESSORS = ('oi.context_processors.testing', 'django.core.context_processors.auth') MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', Modified: trunk/templates/forum/forum_detail.html ================================================================= --- trunk/templates/forum/forum_detail.html (original) +++ trunk/templates/forum/forum_detail.html Sat Mar 8 18:52:00 2008 @@ -27,7 +27,7 @@
- +
{% if topic.is_unread %}unread{% else %}read{% endif %}{{ topic.title|escape }}
{{ topic.posts }}
{{ topic.views }}
{{ topic.topic_latest_post.edited|date:"d F Y H:i" }}
{{ topic.topic_latest_post.author }}
From oi-commits at pardus.org.tr Sun Mar 9 08:52:50 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sun, 9 Mar 2008 08:52:50 +0200 (EET) Subject: [Oi-commits] r1118 - in trunk: forum templates/forum Message-ID: <20080309065250.EA90A7C0090@liste.uludag.org.tr> Author: jnmbk Date: Sun Mar 9 08:52:50 2008 New Revision: 1118 Modified: trunk/forum/views.py trunk/templates/forum/forum_list.html Log: Don't explode when there are no last messages Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sun Mar 9 08:52:50 2008 @@ -32,7 +32,7 @@ forums += 1 topics += forum.topics posts += forum.posts - if forum.forum_latest_post.edited > request.session['last_visit']: + if forum.forum_latest_post and forum.forum_latest_post.edited > request.session['last_visit']: forum.is_unread = True else: forum.is_unread = False Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Sun Mar 9 08:52:50 2008 @@ -27,7 +27,7 @@ {% else %}
-
{{ forum.name|escape }}
{{ forum.description }}
+
{{ forum.topics }}
{{ forum.posts }}
{% if forum.forum_latest_post %}{{ forum.forum_latest_post.edited|date:"d F Y H:i" }}
{{ forum.forum_latest_post.author }} {% else %}Hen?z ileti yok{% endif %} From oi-commits at pardus.org.tr Sun Mar 9 10:06:12 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sun, 9 Mar 2008 10:06:12 +0200 (EET) Subject: [Oi-commits] r1119 - in trunk: forum templates/forum Message-ID: <20080309080613.0D2EE864001@liste.uludag.org.tr> Author: jnmbk Date: Sun Mar 9 10:06:12 2008 New Revision: 1119 Modified: trunk/forum/views.py trunk/templates/forum/forum_detail.html trunk/templates/forum/forum_list.html Log: Still doesn't work but let's put read messages somewhere... (I think paginator does something there and doesn't return our modified objects to template) Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sun Mar 9 10:06:12 2008 @@ -32,10 +32,12 @@ forums += 1 topics += forum.topics posts += forum.posts - if forum.forum_latest_post and forum.forum_latest_post.edited > request.session['last_visit']: - forum.is_unread = True + if forum.forum_latest_post and \ + forum.forum_latest_post.edited > request.session['last_visit']\ + and not forum_latest_post.topic.id in request.session['read_topics_set']: + forum.is_read = False else: - forum.is_unread = False + forum.is_read = True usercount = User.objects.count() currentdate = datetime.now() @@ -50,10 +52,11 @@ topics = forum.topic_set.all().order_by('-sticky', '-topic_latest_post') for topic in topics: - if topic.topic_latest_post.edited > request.session['last_visit']: - topic.is_unread = True + if topic.topic_latest_post.edited > request.session['last_visit'] and \ + not topic.id in request.session["read_topics_set"]: + topic.is_read = False else: - topic.is_unread = False + topic.is_read = True return object_list(request, topics, template_name = 'forum/forum_detail.html', @@ -70,10 +73,11 @@ posts = topic.post_set.all().order_by('created') news_list = News.objects.filter(status=1).order_by('-update')[:3] - session_key = 'visited_'+topic_id - - if request.user.is_authenticated() and not session_key in request.session: - request.session[session_key] = True + try: + request.session["read_topics_set"].add(topic.id) + except: + request.session["read_topics_set"] = set() + request.session["read_topics_set"].add(topic.id) topic.views += 1 topic.save() @@ -344,8 +348,9 @@ return flood,timeout def lastvisit_control(request): - if not 'last_visit' in request.session: - request.session['last_visit'] = datetime.now() + if not "last_visit" in request.session: + request.session["last_visit"] = datetime.now() + request.session["read_topics_set"] = set() def delete_post(request,forum_slug,topic_id, post_id): """ The delete part should be controlled better !""" Modified: trunk/templates/forum/forum_detail.html ================================================================= --- trunk/templates/forum/forum_detail.html (original) +++ trunk/templates/forum/forum_detail.html Sun Mar 9 10:06:12 2008 @@ -27,7 +27,7 @@
-
{% if topic.is_unread %}unread{% else %}read{% endif %}{{ topic.title|escape }}
+
{% if not topic.is_read %}un{% endif %}read{{ topic.title|escape }}
{{ topic.posts }}
{{ topic.views }}
{{ topic.topic_latest_post.edited|date:"d F Y H:i" }}
{{ topic.topic_latest_post.author }}
Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Sun Mar 9 10:06:12 2008 @@ -27,7 +27,7 @@ {% else %}
- +
{{ forum.topics }}
{{ forum.posts }}
{% if forum.forum_latest_post %}{{ forum.forum_latest_post.edited|date:"d F Y H:i" }}
{{ forum.forum_latest_post.author }} {% else %}Hen?z ileti yok{% endif %} From oi-commits at pardus.org.tr Mon Mar 10 05:07:37 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Mon, 10 Mar 2008 05:07:37 +0200 (EET) Subject: [Oi-commits] r1120 - trunk/forum Message-ID: <20080310030737.D8DD6864001@liste.uludag.org.tr> Author: jnmbk Date: Mon Mar 10 05:07:37 2008 New Revision: 1120 Modified: trunk/forum/feeds.py Log: post feeds work properly now Modified: trunk/forum/feeds.py ================================================================= --- trunk/forum/feeds.py (original) +++ trunk/forum/feeds.py Mon Mar 10 05:07:37 2008 @@ -25,7 +25,10 @@ description_template = 'forum/feed_description.html' def items(self): - return Post.objects.filter(hidden=0).order_by('-edited')[:10] + objects = Post.objects.filter(hidden=0).order_by('-edited')[:10] + for post in objects: + post.title = post.topic.title + return objects class Atom(RSS): feed_type = Atom1Feed @@ -46,7 +49,6 @@ return Topic.objects.get(id=bits[0].strip()) # get the topic thing - def title(self,obj): """ Istenilen forumun baslik kismi """ return SITE_NAME + " Forum Konusu : "+obj.title @@ -71,12 +73,10 @@ raise FeedDoesNotExist return WEB_URL+item.get_absolute_url() - class Topic_Atom(Topic_Rss): feed_type = Atom1Feed subtitle = Topic_Rss.description - class Tag_Rss(Topic_Rss): """ Acilan Taglara g?re Rss""" @@ -89,12 +89,10 @@ return Tag.objects.get(id=bits[0]) # get the topic thing - def title(self,obj): """ Istenilen tag baslik kismi """ return SITE_NAME + " Forum Tag s?ralamas? : "+obj.name - def items(self,obj): """ Istenilen Konular burada olacak""" return Topic.objects.filter(tags=obj,hidden=0).order_by('title')[:10] @@ -103,7 +101,3 @@ """ Bir de atom aya?? """ feed_type = Atom1Feed subtitle = Tag_Rss.description - - - - From oi-commits at pardus.org.tr Mon Mar 10 05:19:05 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Mon, 10 Mar 2008 05:19:05 +0200 (EET) Subject: [Oi-commits] r1121 - trunk/forum Message-ID: <20080310031905.7AA94864001@liste.uludag.org.tr> Author: jnmbk Date: Mon Mar 10 05:19:05 2008 New Revision: 1121 Modified: trunk/forum/feeds.py Log: let's take latest 40 posts in feed Modified: trunk/forum/feeds.py ================================================================= --- trunk/forum/feeds.py (original) +++ trunk/forum/feeds.py Mon Mar 10 05:19:05 2008 @@ -25,7 +25,7 @@ description_template = 'forum/feed_description.html' def items(self): - objects = Post.objects.filter(hidden=0).order_by('-edited')[:10] + objects = Post.objects.filter(hidden=0).order_by('-edited')[:40] for post in objects: post.title = post.topic.title return objects From oi-commits at pardus.org.tr Mon Mar 10 05:23:50 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Mon, 10 Mar 2008 05:23:50 +0200 (EET) Subject: [Oi-commits] r1122 - trunk/forum Message-ID: <20080310032350.57BFA864001@liste.uludag.org.tr> Author: jnmbk Date: Mon Mar 10 05:23:50 2008 New Revision: 1122 Modified: trunk/forum/views.py Log: typo Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Mon Mar 10 05:23:50 2008 @@ -34,7 +34,7 @@ posts += forum.posts if forum.forum_latest_post and \ forum.forum_latest_post.edited > request.session['last_visit']\ - and not forum_latest_post.topic.id in request.session['read_topics_set']: + and not forum.forum_latest_post.topic.id in request.session['read_topics_set']: forum.is_read = False else: forum.is_read = True From oi-commits at pardus.org.tr Mon Mar 10 05:57:56 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Mon, 10 Mar 2008 05:57:56 +0200 (EET) Subject: [Oi-commits] r1123 - trunk/forum Message-ID: <20080310035756.B0BA07C00CE@liste.uludag.org.tr> Author: jnmbk Date: Mon Mar 10 05:57:56 2008 New Revision: 1123 Modified: trunk/forum/feeds.py Log: also return author Modified: trunk/forum/feeds.py ================================================================= --- trunk/forum/feeds.py (original) +++ trunk/forum/feeds.py Mon Mar 10 05:57:56 2008 @@ -30,6 +30,9 @@ post.title = post.topic.title return objects + def item_author_name(self, item): + return item.author + class Atom(RSS): feed_type = Atom1Feed subtitle = RSS.description From turkay.eren at gmail.com Mon Mar 10 06:44:54 2008 From: turkay.eren at gmail.com (Eren =?utf-8?q?T=C3=BCrkay?=) Date: Mon, 10 Mar 2008 06:44:54 +0200 Subject: [Oi-commits] r1120 - trunk/forum In-Reply-To: <20080310030737.D8DD6864001@liste.uludag.org.tr> References: <20080310030737.D8DD6864001@liste.uludag.org.tr> Message-ID: <200803100644.54704.turkay.eren@gmail.com> On 10 Mar 2008 Mon 05:07:37 oi-commits at pardus.org.tr wrote: > Modified: > ? ?trunk/forum/feeds.py > Log: > post feeds work properly now Yaay! ?ok g?zel oldu bu :-) From oi-commits at pardus.org.tr Wed Mar 12 15:19:17 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 12 Mar 2008 15:19:17 +0200 (EET) Subject: [Oi-commits] r1124 - in trunk: forum templates/forum Message-ID: <20080312131917.B8FF57C0096@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 12 15:19:17 2008 New Revision: 1124 Modified: trunk/forum/views.py trunk/templates/forum/forum_list.html Log: it works perfect in main forum page and works in forum detail with a little touch on paginator code which I'll commit soon Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Wed Mar 12 15:19:17 2008 @@ -26,18 +26,28 @@ lastvisit_control(request) categories = Category.objects.order_by('order') + categories = [(category, category.forum_set.all()) for category in categories] forums = topics = posts = 0 for category in categories: - for forum in category.forum_set.all(): + for forum in category[1]: forums += 1 topics += forum.topics posts += forum.posts - if forum.forum_latest_post and \ - forum.forum_latest_post.edited > request.session['last_visit']\ - and not forum.forum_latest_post.topic.id in request.session['read_topics_set']: - forum.is_read = False - else: - forum.is_read = True + + # read/unread stuff + if request.user.is_authenticated(): + readTopics = 0 + counter = 0 + for topic in forum.topic_set.all(): + counter += 1 + if topic.topic_latest_post.edited > request.session['last_visit'] or\ + "read_topic_%s" % topic.id in request.session: + readTopics += 1 + print counter, readTopics + if counter == readTopics: + forum.is_read = True + else: + forum.is_read = False usercount = User.objects.count() currentdate = datetime.now() @@ -51,12 +61,13 @@ forum = get_object_or_404(Forum, slug=forum_slug) topics = forum.topic_set.all().order_by('-sticky', '-topic_latest_post') - for topic in topics: - if topic.topic_latest_post.edited > request.session['last_visit'] and \ - not topic.id in request.session["read_topics_set"]: - topic.is_read = False - else: - topic.is_read = True + if request.user.is_authenticated(): + for topic in topics: + if topic.topic_latest_post.edited > request.session['last_visit'] or\ + "read_topic_%s" % topic.id in request.session: + topic.is_read = True + else: + topic.is_read = False return object_list(request, topics, template_name = 'forum/forum_detail.html', @@ -73,11 +84,8 @@ posts = topic.post_set.all().order_by('created') news_list = News.objects.filter(status=1).order_by('-update')[:3] - try: - request.session["read_topics_set"].add(topic.id) - except: - request.session["read_topics_set"] = set() - request.session["read_topics_set"].add(topic.id) + if request.user.is_authenticated(): + request.session["read_topic_%s" % topic.id] = True topic.views += 1 topic.save() @@ -350,7 +358,6 @@ def lastvisit_control(request): if not "last_visit" in request.session: request.session["last_visit"] = datetime.now() - request.session["read_topics_set"] = set() def delete_post(request,forum_slug,topic_id, post_id): """ The delete part should be controlled better !""" Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Wed Mar 12 15:19:17 2008 @@ -14,7 +14,7 @@
?letiler
Son ?leti
-{% for category in categories %} +{% for category, forum_list in categories %} {% if category.hidden and not perms.forum.can_see_hidden_categories %} {% else %} @@ -22,7 +22,7 @@
{{ category.name|escape }}
- {% for forum in category.forum_set.all %} + {% for forum in forum_list %} {% if forum.hidden and not perms.forum.can_see_hidden_forums %} {% else %}
From oi-commits at pardus.org.tr Wed Mar 12 15:33:52 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 12 Mar 2008 15:33:52 +0200 (EET) Subject: [Oi-commits] r1125 - trunk/forum Message-ID: <20080312133352.7AA007C0133@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 12 15:33:52 2008 New Revision: 1125 Added: trunk/forum/customgeneric.py Modified: trunk/forum/views.py Log: commented out one line in Django's generic.py for use in forum_detail Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Wed Mar 12 15:33:52 2008 @@ -18,6 +18,7 @@ from oi.st.wrappers import render_response from oi.forum.models import Category, Forum, Topic, Post, AbuseReport, WatchList +from oi.forum import customgeneric from django.core.urlresolvers import reverse from oi.st.models import Tag, News @@ -69,7 +70,7 @@ else: topic.is_read = False - return object_list(request, topics, + return customgeneric.object_list(request, topics, template_name = 'forum/forum_detail.html', template_object_name = 'topic', extra_context = {'forum': forum}, From ugur.jnmbk at gmail.com Wed Mar 12 15:36:15 2008 From: ugur.jnmbk at gmail.com (=?UTF-8?Q?U=C4=9Fur_=C3=87etin?=) Date: Wed, 12 Mar 2008 15:36:15 +0200 Subject: [Oi-commits] r1125 - trunk/forum In-Reply-To: <20080312133352.7AA007C0133@liste.uludag.org.tr> References: <20080312133352.7AA007C0133@liste.uludag.org.tr> Message-ID: <9dca79e40803120636u441d8aeevc93c4ff10bd4874f@mail.gmail.com> 2008/3/12, oi-commits at pardus.org.tr : > Author: jnmbk > Date: Wed Mar 12 15:33:52 2008 > New Revision: 1125 > > Added: > trunk/forum/customgeneric.py > Modified: > trunk/forum/views.py > Log: > commented out one line in Django's generic.py for use in forum_detail Yorumlar? alal?m. ?ok mu k?t?, daha iyi bir ?ekilde ??z?lebilir mi? Bir sorun yarat?r m?? -- U?ur ?etin From oi-commits at pardus.org.tr Wed Mar 12 15:43:20 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 12 Mar 2008 15:43:20 +0200 (EET) Subject: [Oi-commits] r1126 - trunk/forum Message-ID: <20080312134320.6C77F7C012E@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 12 15:43:20 2008 New Revision: 1126 Modified: trunk/forum/views.py Log: removed printf debugging Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Wed Mar 12 15:43:20 2008 @@ -44,7 +44,6 @@ if topic.topic_latest_post.edited > request.session['last_visit'] or\ "read_topic_%s" % topic.id in request.session: readTopics += 1 - print counter, readTopics if counter == readTopics: forum.is_read = True else: From oi-commits at pardus.org.tr Wed Mar 12 16:15:42 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 12 Mar 2008 16:15:42 +0200 (EET) Subject: [Oi-commits] r1127 - in trunk/templates: game howto news package Message-ID: <20080312141542.307C27C012E@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 12 16:15:41 2008 New Revision: 1127 Modified: trunk/templates/game/game_detail.html trunk/templates/howto/howto_detail.html trunk/templates/news/news_detail.html trunk/templates/package/package_detail.html Log: Yolla->G?nder and some cosmetics Modified: trunk/templates/game/game_detail.html ================================================================= --- trunk/templates/game/game_detail.html (original) +++ trunk/templates/game/game_detail.html Wed Mar 12 16:15:41 2008 @@ -34,9 +34,8 @@
{{form}}
- -
- Yorumlar ({{ comment_count }}) + Yorumlar ({{ comment_count }}) +
{% endif %} {% endif %} Modified: trunk/templates/howto/howto_detail.html ================================================================= --- trunk/templates/howto/howto_detail.html (original) +++ trunk/templates/howto/howto_detail.html Wed Mar 12 16:15:41 2008 @@ -35,10 +35,9 @@ {% if form %}
{{form}} -
- -
- Yorumlar ({{ comment_count }}) +
+ Yorumlar ({{ comment_count }}) +
{% endif %} {% endif %} Modified: trunk/templates/news/news_detail.html ================================================================= --- trunk/templates/news/news_detail.html (original) +++ trunk/templates/news/news_detail.html Wed Mar 12 16:15:41 2008 @@ -34,9 +34,8 @@
{{form}}
- -
- Yorumlar ({{ comment_count }}) + Yorumlar ({{ comment_count }}) +
{% endif %} {% endif %} Modified: trunk/templates/package/package_detail.html ================================================================= --- trunk/templates/package/package_detail.html (original) +++ trunk/templates/package/package_detail.html Wed Mar 12 16:15:41 2008 @@ -34,9 +34,8 @@
{{form}}
- -
- Yorumlar ({{ comment_count }}) + Yorumlar ({{ comment_count }}) +
{% endif %} {% endif %} From oi-commits at pardus.org.tr Wed Mar 12 17:05:04 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 12 Mar 2008 17:05:04 +0200 (EET) Subject: [Oi-commits] r1128 - trunk/forum Message-ID: <20080312150504.52A6B7C0129@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 12 17:05:04 2008 New Revision: 1128 Modified: trunk/forum/views.py Log: Django has 'request.session.modified = True' so I can use a set here Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Wed Mar 12 17:05:04 2008 @@ -42,7 +42,7 @@ for topic in forum.topic_set.all(): counter += 1 if topic.topic_latest_post.edited > request.session['last_visit'] or\ - "read_topic_%s" % topic.id in request.session: + topic.id in request.session["read_topic_set"]: readTopics += 1 if counter == readTopics: forum.is_read = True @@ -64,7 +64,7 @@ if request.user.is_authenticated(): for topic in topics: if topic.topic_latest_post.edited > request.session['last_visit'] or\ - "read_topic_%s" % topic.id in request.session: + topic.id in request.session["read_topic_set"]: topic.is_read = True else: topic.is_read = False @@ -84,8 +84,9 @@ posts = topic.post_set.all().order_by('created') news_list = News.objects.filter(status=1).order_by('-update')[:3] - if request.user.is_authenticated(): - request.session["read_topic_%s" % topic.id] = True + if request.user.is_authenticated() and not topic.id in request.session["read_topic_set"]: + request.session["read_topic_set"].add(topic.id) + request.session.modified = True topic.views += 1 topic.save() @@ -358,6 +359,8 @@ def lastvisit_control(request): if not "last_visit" in request.session: request.session["last_visit"] = datetime.now() + if not "read_topic_set" in request.session: + request.session["read_topic_set"] = set() def delete_post(request,forum_slug,topic_id, post_id): """ The delete part should be controlled better !""" From oi-commits at pardus.org.tr Wed Mar 12 17:44:00 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 12 Mar 2008 17:44:00 +0200 (EET) Subject: [Oi-commits] r1129 - in trunk: media/dijital/img/forum templates/forum Message-ID: <20080312154400.2C2397C00A2@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 12 17:43:59 2008 New Revision: 1129 Added: trunk/media/dijital/img/forum/topic_unread.png (contents, props changed) Modified: trunk/templates/forum/forum_detail.html trunk/templates/forum/forum_list.html Log: unread topic icon (we also need topic_unread_locked) Modified: trunk/templates/forum/forum_detail.html ================================================================= --- trunk/templates/forum/forum_detail.html (original) +++ trunk/templates/forum/forum_detail.html Wed Mar 12 17:43:59 2008 @@ -26,8 +26,8 @@ {% else %}
- -
{% if not topic.is_read %}un{% endif %}read{{ topic.title|escape }}
+ +
{{ topic.posts }}
{{ topic.views }}
{{ topic.topic_latest_post.edited|date:"d F Y H:i" }}
{{ topic.topic_latest_post.author }}
Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Wed Mar 12 17:43:59 2008 @@ -26,8 +26,8 @@ {% if forum.hidden and not perms.forum.can_see_hidden_forums %} {% else %}
-
- +
{% if forum.is_read %}{% else %}{% endif %}
+
{{ forum.name|escape }}
{{ forum.description }}
{{ forum.topics }}
{{ forum.posts }}
{% if forum.forum_latest_post %}{{ forum.forum_latest_post.edited|date:"d F Y H:i" }}
{{ forum.forum_latest_post.author }} {% else %}Hen?z ileti yok{% endif %} From oi-commits at pardus.org.tr Wed Mar 12 18:00:56 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 12 Mar 2008 18:00:56 +0200 (EET) Subject: [Oi-commits] r1130 - in trunk: media/dijital/img/forum templates/forum Message-ID: <20080312160056.900297C00A2@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 12 18:00:56 2008 New Revision: 1130 Added: trunk/media/dijital/img/forum/topic_unread_locked.png - copied, changed from r1129, trunk/media/dijital/img/forum/topic_unread.png Modified: trunk/templates/forum/forum_detail.html Log: image for unread and locked topics Copied: trunk/media/dijital/img/forum/topic_unread_locked.png (from r1129, trunk/media/dijital/img/forum/topic_unread.png) ================================================================= Binary files. No diff available. Modified: trunk/templates/forum/forum_detail.html ================================================================= --- trunk/templates/forum/forum_detail.html (original) +++ trunk/templates/forum/forum_detail.html Wed Mar 12 18:00:56 2008 @@ -26,7 +26,7 @@ {% else %}
- +
{{ topic.posts }}
{{ topic.views }}
From ahmet at pardusman.org Wed Mar 12 23:31:31 2008 From: ahmet at pardusman.org (Ahmet =?utf-8?q?AYG=C3=9CN?=) Date: Wed, 12 Mar 2008 23:31:31 +0200 Subject: [Oi-commits] r1125 - trunk/forum In-Reply-To: <9dca79e40803120636u441d8aeevc93c4ff10bd4874f@mail.gmail.com> References: <20080312133352.7AA007C0133@liste.uludag.org.tr> <9dca79e40803120636u441d8aeevc93c4ff10bd4874f@mail.gmail.com> Message-ID: <200803122331.34103.ahmet@pardusman.org> Wednesday 12 March 2008 15:36:15 tarihinde U?ur ?etin ?unlar? yazm??t?: > Yorumlar? alal?m. ?ok mu k?t?, daha iyi bir ?ekilde ??z?lebilir mi? > Bir sorun yarat?r m?? "If it works, don't touch." der atalar?m?z :D -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. Url : http://liste.pardus.org.tr/oi-commits/attachments/20080312/a3fa9e3e/attachment.pgp From oi-commits at pardus.org.tr Thu Mar 13 03:37:56 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 13 Mar 2008 03:37:56 +0200 (EET) Subject: [Oi-commits] r1131 - trunk/forum Message-ID: <20080313013756.141487C00BE@liste.uludag.org.tr> Author: jnmbk Date: Thu Mar 13 03:37:55 2008 New Revision: 1131 Modified: trunk/forum/views.py Log: redirect when forum name in URL is wrong Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Thu Mar 13 03:37:55 2008 @@ -79,8 +79,10 @@ def topic(request, forum_slug, topic_id): lastvisit_control(request) - forum = get_object_or_404(Forum, slug=forum_slug) topic = get_object_or_404(Topic, pk=topic_id) + forum = topic.forum + if forum.slug != forum_slug: + return HttpResponseRedirect(topic.get_absolute_url()) posts = topic.post_set.all().order_by('created') news_list = News.objects.filter(status=1).order_by('-update')[:3] From oi-commits at pardus.org.tr Thu Mar 13 14:01:26 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 13 Mar 2008 14:01:26 +0200 (EET) Subject: [Oi-commits] r1132 - trunk/st Message-ID: <20080313120126.1ABA87C00FC@liste.uludag.org.tr> Author: jnmbk Date: Thu Mar 13 14:01:25 2008 New Revision: 1132 Modified: trunk/st/forms.py Log: Allow longer comments Modified: trunk/st/forms.py ================================================================= --- trunk/st/forms.py (original) +++ trunk/st/forms.py Thu Mar 13 14:01:25 2008 @@ -13,4 +13,4 @@ class CommentForm(forms.Form): """ The comment thingy add validation please...""" - yorum=XssField(label="Yorum",required=True,max_length=100,widget=forms.Textarea(attrs={'rows': '20', 'cols': '60',})) + yorum=XssField(label="Yorum",required=True,max_length=1000,widget=forms.Textarea(attrs={'rows': '20', 'cols': '60',})) From oi-commits at pardus.org.tr Thu Mar 13 14:20:58 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Thu, 13 Mar 2008 14:20:58 +0200 (EET) Subject: [Oi-commits] r1133 - trunk/forum Message-ID: <20080313122058.1C7F77C010B@liste.uludag.org.tr> Author: jnmbk Date: Thu Mar 13 14:20:57 2008 New Revision: 1133 Modified: trunk/forum/views.py Log: don't waste any cpu for non-authenticated Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Thu Mar 13 14:20:57 2008 @@ -359,10 +359,11 @@ return flood,timeout def lastvisit_control(request): - if not "last_visit" in request.session: - request.session["last_visit"] = datetime.now() - if not "read_topic_set" in request.session: - request.session["read_topic_set"] = set() + if request.user.is_authenticated(): + if not "last_visit" in request.session: + request.session["last_visit"] = datetime.now() + if not "read_topic_set" in request.session: + request.session["read_topic_set"] = set() def delete_post(request,forum_slug,topic_id, post_id): """ The delete part should be controlled better !""" From turkay.eren at gmail.com Thu Mar 13 19:48:39 2008 From: turkay.eren at gmail.com (Eren =?utf-8?q?T=C3=BCrkay?=) Date: Thu, 13 Mar 2008 19:48:39 +0200 Subject: [Oi-commits] r1125 - trunk/forum In-Reply-To: <9dca79e40803120636u441d8aeevc93c4ff10bd4874f@mail.gmail.com> References: <20080312133352.7AA007C0133@liste.uludag.org.tr> <9dca79e40803120636u441d8aeevc93c4ff10bd4874f@mail.gmail.com> Message-ID: <200803131948.39844.turkay.eren@gmail.com> On 12 Mar 2008 Wed 15:36:15 U?ur ?etin wrote: > Yorumlar? alal?m. ?ok mu k?t?, daha iyi bir ?ekilde ??z?lebilir mi? > Bir sorun yarat?r m?? Yaln?z neden bunu commentledik :-) From ahmet at pardusman.org Thu Mar 13 20:26:51 2008 From: ahmet at pardusman.org (Ahmet =?utf-8?q?AYG=C3=9CN?=) Date: Thu, 13 Mar 2008 20:26:51 +0200 Subject: [Oi-commits] r1125 - trunk/forum In-Reply-To: <200803131948.39844.turkay.eren@gmail.com> References: <20080312133352.7AA007C0133@liste.uludag.org.tr> <9dca79e40803120636u441d8aeevc93c4ff10bd4874f@mail.gmail.com> <200803131948.39844.turkay.eren@gmail.com> Message-ID: <200803132026.54033.ahmet@pardusman.org> Thursday 13 March 2008 19:48:39 tarihinde Eren T?rkay ?unlar? yazm??t?: > Yaln?z neden bunu commentledik :-) Commentlemek ne demek? -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. Url : http://liste.pardus.org.tr/oi-commits/attachments/20080313/5921d4b2/attachment.pgp From turkay.eren at gmail.com Thu Mar 13 22:01:32 2008 From: turkay.eren at gmail.com (Eren =?utf-8?q?T=C3=BCrkay?=) Date: Thu, 13 Mar 2008 22:01:32 +0200 Subject: [Oi-commits] r1125 - trunk/forum In-Reply-To: <200803122331.34103.ahmet@pardusman.org> References: <20080312133352.7AA007C0133@liste.uludag.org.tr> <9dca79e40803120636u441d8aeevc93c4ff10bd4874f@mail.gmail.com> <200803122331.34103.ahmet@pardusman.org> Message-ID: <200803132201.32161.turkay.eren@gmail.com> On 12 Mar 2008 Wed 23:31:31 Ahmet AYG?N wrote: > "If it works, don't touch." der atalar?m?z :D O "If ain't broken, don't fix it" olmas?n? :P From ahmet at pardusman.org Fri Mar 14 01:06:39 2008 From: ahmet at pardusman.org (Ahmet =?utf-8?q?AYG=C3=9CN?=) Date: Fri, 14 Mar 2008 01:06:39 +0200 Subject: [Oi-commits] r1125 - trunk/forum In-Reply-To: <200803132201.32161.turkay.eren@gmail.com> References: <20080312133352.7AA007C0133@liste.uludag.org.tr> <200803122331.34103.ahmet@pardusman.org> <200803132201.32161.turkay.eren@gmail.com> Message-ID: <200803140106.42680.ahmet@pardusman.org> Thursday 13 March 2008 22:01:32 tarihinde Eren T?rkay ?unlar? yazm??t?: > O "If ain't broken, don't fix it" olmas?n? :P Google'dan aray?p buraya yazma olm, ayr?ca atalar?m?z farkl? olamaz m?? :D -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. Url : http://liste.pardus.org.tr/oi-commits/attachments/20080314/c1b94a8d/attachment.pgp From oi-commits at pardus.org.tr Fri Mar 14 13:32:28 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 14 Mar 2008 13:32:28 +0200 (EET) Subject: [Oi-commits] r1134 - trunk/forum Message-ID: <20080314113228.430D67C00EB@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 14 13:32:27 2008 New Revision: 1134 Modified: trunk/forum/views.py Log: login required for delete Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Fri Mar 14 13:32:27 2008 @@ -365,6 +365,7 @@ if not "read_topic_set" in request.session: request.session["read_topic_set"] = set() + at login_required def delete_post(request,forum_slug,topic_id, post_id): """ The delete part should be controlled better !""" forum = get_object_or_404(Forum, slug=forum_slug) From oi-commits at pardus.org.tr Fri Mar 14 14:05:13 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 14 Mar 2008 14:05:13 +0200 (EET) Subject: [Oi-commits] r1135 - trunk/forum Message-ID: <20080314120513.C88AA7C0080@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 14 14:05:13 2008 New Revision: 1135 Modified: trunk/forum/views.py Log: faster read forum detection(but all topic counts must be correct, so a button for recount is needed since we moved some topics from admin panel which didn't change topic counts of current and target forum) Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Fri Mar 14 14:05:13 2008 @@ -36,15 +36,8 @@ posts += forum.posts # read/unread stuff - if request.user.is_authenticated(): - readTopics = 0 - counter = 0 - for topic in forum.topic_set.all(): - counter += 1 - if topic.topic_latest_post.edited > request.session['last_visit'] or\ - topic.id in request.session["read_topic_set"]: - readTopics += 1 - if counter == readTopics: + if forum.id in request.session["read_forum_dict"]: + if forum.topics == request.session["read_forum_dict"][forum.id]: forum.is_read = True else: forum.is_read = False @@ -88,6 +81,10 @@ if request.user.is_authenticated() and not topic.id in request.session["read_topic_set"]: request.session["read_topic_set"].add(topic.id) + if not forum.id in request.session["read_forum_dict"]: + request.session["read_forum_dict"][forum.id] = 1 + else: + request.session["read_forum_dict"][forum.id] += 1 request.session.modified = True topic.views += 1 @@ -364,6 +361,8 @@ request.session["last_visit"] = datetime.now() if not "read_topic_set" in request.session: request.session["read_topic_set"] = set() + if not "read_forum_dict" in request.session: + request.session["read_forum_dict"] = {} @login_required def delete_post(request,forum_slug,topic_id, post_id): From oi-commits at pardus.org.tr Fri Mar 14 16:48:44 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 14 Mar 2008 16:48:44 +0200 (EET) Subject: [Oi-commits] r1136 - in trunk: media/dijital/img/forum templates/forum Message-ID: <20080314144844.BE1527C00F2@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 14 16:48:44 2008 New Revision: 1136 Added: trunk/media/dijital/img/forum/topic.png - copied, changed from r1075, trunk/media/dijital/img/forum/eski_konu.gif Removed: trunk/media/dijital/img/forum/eski_konu.gif Modified: trunk/templates/forum/forum_detail.html trunk/templates/forum/forum_list.html Log: eski_konu.gif->topic.png Copied: trunk/media/dijital/img/forum/topic.png (from r1075, trunk/media/dijital/img/forum/eski_konu.gif) ================================================================= Binary files. No diff available. Modified: trunk/templates/forum/forum_detail.html ================================================================= --- trunk/templates/forum/forum_detail.html (original) +++ trunk/templates/forum/forum_detail.html Fri Mar 14 16:48:44 2008 @@ -26,7 +26,7 @@ {% else %}
- +
{{ topic.posts }}
{{ topic.views }}
Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Fri Mar 14 16:48:44 2008 @@ -26,7 +26,7 @@ {% if forum.hidden and not perms.forum.can_see_hidden_forums %} {% else %}
-
{% if forum.is_read %}{% else %}{% endif %}
+
{{ forum.name|escape }}
{{ forum.description }}
{{ forum.topics }}
{{ forum.posts }}
From oi-commits at pardus.org.tr Sat Mar 15 11:41:55 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 15 Mar 2008 11:41:55 +0200 (EET) Subject: [Oi-commits] r1137 - trunk/forum Message-ID: <20080315094156.043607C00D2@liste.uludag.org.tr> Author: jnmbk Date: Sat Mar 15 11:41:55 2008 New Revision: 1137 Modified: trunk/forum/views.py Log: forgot to add auth control Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sat Mar 15 11:41:55 2008 @@ -36,7 +36,7 @@ posts += forum.posts # read/unread stuff - if forum.id in request.session["read_forum_dict"]: + if request.user.is_authenticated() and forum.id in request.session["read_forum_dict"]: if forum.topics == request.session["read_forum_dict"][forum.id]: forum.is_read = True else: From oi-commits at pardus.org.tr Sat Mar 15 11:56:22 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 15 Mar 2008 11:56:22 +0200 (EET) Subject: [Oi-commits] r1138 - trunk/media/css Message-ID: <20080315095622.6DDF47C004E@liste.uludag.org.tr> Author: jnmbk Date: Sat Mar 15 11:56:22 2008 New Revision: 1138 Modified: trunk/media/css/forum.css Log: consistent look&feel for browsers Modified: trunk/media/css/forum.css ================================================================= --- trunk/media/css/forum.css (original) +++ trunk/media/css/forum.css Sat Mar 15 11:56:22 2008 @@ -3,7 +3,11 @@ .blue{ color:#51798E; } - +a { + color: #0000EE; + text-decoration: underline; +} +a:visited { color: #551A8B; } /*The colors end here */ /* header */ From oi-commits at pardus.org.tr Sat Mar 15 12:12:18 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 15 Mar 2008 12:12:18 +0200 (EET) Subject: [Oi-commits] r1139 - trunk/media/dijital/img Message-ID: <20080315101218.818A17C00B2@liste.uludag.org.tr> Author: jnmbk Date: Sat Mar 15 12:12:18 2008 New Revision: 1139 Modified: trunk/media/dijital/img/beta.png Log: non-beta Modified: trunk/media/dijital/img/beta.png ================================================================= Binary files. No diff available. From oi-commits at pardus.org.tr Sat Mar 15 15:23:01 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 15 Mar 2008 15:23:01 +0200 (EET) Subject: [Oi-commits] r1140 - in trunk: . forum Message-ID: <20080315132301.DABB87C00AB@liste.uludag.org.tr> Author: jnmbk Date: Sat Mar 15 15:23:01 2008 New Revision: 1140 Modified: trunk/AUTHORS trunk/forum/views.py Log: it works better now (thanks Ak?n) Modified: trunk/AUTHORS ================================================================= --- trunk/AUTHORS (original) +++ trunk/AUTHORS Sat Mar 15 15:23:01 2008 @@ -3,11 +3,14 @@ Developers Ahmet AYG?N - Eren T?RKAY + Ak?n ?mero?lu Denis K?rov + Ekrem Seren + Eren T?RKAY Special Thanks Miss Pizza for their delicious pizzas, Duran Sandwiches for their delicious sandwiches and tortillas, Pardus for subversion service, - Evim Nargile for hookah. + Evim Nargile for hookah, + fal?ata.png (Ahmet knows it). Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sat Mar 15 15:23:01 2008 @@ -36,8 +36,11 @@ posts += forum.posts # read/unread stuff - if request.user.is_authenticated() and forum.id in request.session["read_forum_dict"]: - if forum.topics == request.session["read_forum_dict"][forum.id]: + if request.user.is_authenticated(): + if forum.id in request.session["read_forum_dict"] and\ + forum.forum_latest_post.edited < request.session["read_forum_dict"][forum.id]: + forum.is_read = True + elif not forum.forum_latest_post or request.session["last_visit"] > forum.forum_latest_post.edited: forum.is_read = True else: forum.is_read = False @@ -56,8 +59,12 @@ if request.user.is_authenticated(): for topic in topics: - if topic.topic_latest_post.edited > request.session['last_visit'] or\ - topic.id in request.session["read_topic_set"]: + if topic.topic_latest_post.edited > request.session['last_visit'] and\ + not topic.id in request.session["read_topic_dict"]: + topic.is_read = False + elif topic.topic_latest_post.edited < request.session['last_visit'] or\ + not topic.id in request.session["read_topic_dict"] or\ + request.session["read_topic_dict"][topic.id] > topic.topic_latest_post.edited: topic.is_read = True else: topic.is_read = False @@ -79,12 +86,9 @@ posts = topic.post_set.all().order_by('created') news_list = News.objects.filter(status=1).order_by('-update')[:3] - if request.user.is_authenticated() and not topic.id in request.session["read_topic_set"]: - request.session["read_topic_set"].add(topic.id) - if not forum.id in request.session["read_forum_dict"]: - request.session["read_forum_dict"][forum.id] = 1 - else: - request.session["read_forum_dict"][forum.id] += 1 + if request.user.is_authenticated(): + request.session["read_topic_dict"][topic.id] = datetime.now() + request.session["read_forum_dict"][forum.id] = datetime.now() request.session.modified = True topic.views += 1 @@ -359,8 +363,8 @@ if request.user.is_authenticated(): if not "last_visit" in request.session: request.session["last_visit"] = datetime.now() - if not "read_topic_set" in request.session: - request.session["read_topic_set"] = set() + if not "read_topic_dict" in request.session: + request.session["read_topic_dict"] = {} if not "read_forum_dict" in request.session: request.session["read_forum_dict"] = {} From oi-commits at pardus.org.tr Sat Mar 15 15:33:05 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 15 Mar 2008 15:33:05 +0200 (EET) Subject: [Oi-commits] r1141 - trunk/forum Message-ID: <20080315133305.AA66A7C00AC@liste.uludag.org.tr> Author: jnmbk Date: Sat Mar 15 15:33:05 2008 New Revision: 1141 Modified: trunk/forum/views.py Log: we'll go online, so it may be useful some time later Modified: trunk/forum/views.py ================================================================= --- trunk/forum/views.py (original) +++ trunk/forum/views.py Sat Mar 15 15:33:05 2008 @@ -362,6 +362,7 @@ def lastvisit_control(request): if request.user.is_authenticated(): if not "last_visit" in request.session: + request.session["oi_version"] = 1141 request.session["last_visit"] = datetime.now() if not "read_topic_dict" in request.session: request.session["read_topic_dict"] = {} From oi-commits at pardus.org.tr Wed Mar 19 12:30:07 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 19 Mar 2008 12:30:07 +0200 (EET) Subject: [Oi-commits] r1142 - trunk/templates Message-ID: <20080319103007.42480864002@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 19 12:30:06 2008 New Revision: 1142 Modified: trunk/templates/base.html Log: fix planet RSS Modified: trunk/templates/base.html ================================================================= --- trunk/templates/base.html (original) +++ trunk/templates/base.html Wed Mar 19 12:30:06 2008 @@ -11,7 +11,7 @@ - + From oi-commits at pardus.org.tr Wed Mar 19 13:16:01 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 19 Mar 2008 13:16:01 +0200 (EET) Subject: [Oi-commits] r1143 - in trunk: media/css templates/fs templates/game templates/howto templates/news templates/package Message-ID: <20080319111601.A3FE38640B4@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 19 13:16:01 2008 New Revision: 1143 Modified: trunk/media/css/style.css trunk/templates/fs/fs_detail.html trunk/templates/fs/fs_main.html trunk/templates/game/game_detail.html trunk/templates/howto/howto_detail.html trunk/templates/howto/howto_main.html trunk/templates/news/news_main.html trunk/templates/package/package_detail.html trunk/templates/package/package_main.html Log: some cosmetics Modified: trunk/media/css/style.css ================================================================= --- trunk/media/css/style.css (original) +++ trunk/media/css/style.css Wed Mar 19 13:16:01 2008 @@ -753,6 +753,7 @@ line-height: 12px; } ul.sidebar_firststeps { list-style-image: url("/media/img/fav.png"); } +ul.sidebar_seminar { list-style-type: none; } ul.sidebar_subscribers { list-style-image: url('/media/img/bt_next.png'); } ul.sidebar_planets { list-style-image: url('/media/img/other_planets.png'); } Modified: trunk/templates/fs/fs_detail.html ================================================================= --- trunk/templates/fs/fs_detail.html (original) +++ trunk/templates/fs/fs_detail.html Wed Mar 19 13:16:01 2008 @@ -34,12 +34,19 @@ + - {% if fs.videos.all %}
+ {% endblock %} Modified: trunk/templates/howto/howto_detail.html ================================================================= --- trunk/templates/howto/howto_detail.html (original) +++ trunk/templates/howto/howto_detail.html Wed Mar 19 13:16:01 2008 @@ -15,14 +15,11 @@ {% block section %}howto{% endblock %} {% block header_menu %} - - {% include "header.html" %} + {% include "header.html" %} {% endblock %}
{% block ust_menu %} - - {% include "ust_menu_ayrinti.html" %} - + {% include "ust_menu_ayrinti.html" %} {% endblock %}
@@ -88,4 +85,14 @@
+ {% endblock %} Modified: trunk/templates/howto/howto_main.html ================================================================= --- trunk/templates/howto/howto_main.html (original) +++ trunk/templates/howto/howto_main.html Wed Mar 19 13:16:01 2008 @@ -29,19 +29,7 @@ {% if is_paginated %}
{% paginator %}
{{ pages }} sayfada toplam {{ hits }} nas?l yaz?s? bulunmaktad?r.
{% endif %} {% endblock %} -{% block sidebartop %}{% endblock %} - {% block sidebar %} - {% if firststep %} + {% endblock %} Modified: trunk/templates/package/package_main.html ================================================================= --- trunk/templates/package/package_main.html (original) +++ trunk/templates/package/package_main.html Wed Mar 19 13:16:01 2008 @@ -8,14 +8,11 @@ {% block section %}package{% endblock %} {% block header_menu %} - - {% include "header.html" %} + {% include "header.html" %} {% endblock %}
{% block ust_menu %} - - {% include "ust_menu_ayrinti.html" %} - + {% include "ust_menu_ayrinti.html" %} {% endblock %}
From oi-commits at pardus.org.tr Wed Mar 19 13:23:34 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 19 Mar 2008 13:23:34 +0200 (EET) Subject: [Oi-commits] r1144 - trunk/media/css Message-ID: <20080319112334.20A3C7C0088@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 19 13:23:33 2008 New Revision: 1144 Modified: trunk/media/css/forum.css Log: make stats look fine in ie Modified: trunk/media/css/forum.css ================================================================= --- trunk/media/css/forum.css (original) +++ trunk/media/css/forum.css Wed Mar 19 13:23:33 2008 @@ -351,7 +351,10 @@ float: right; padding: 10px 10px 0px 0px; } - +#forum_stats { + overflow: hidden; + width: 100%; +} .forum_stats_latest_post { width: 100%; overflow: hidden; From oi-commits at pardus.org.tr Wed Mar 19 15:06:25 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 19 Mar 2008 15:06:25 +0200 (EET) Subject: [Oi-commits] r1145 - in trunk: media/css profile templates/user Message-ID: <20080319130626.03A3C7C0005@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 19 15:06:25 2008 New Revision: 1145 Modified: trunk/media/css/style.css trunk/profile/views.py trunk/templates/user/profile.html Log: initial user profile (will need much more makeup) Modified: trunk/media/css/style.css ================================================================= --- trunk/media/css/style.css (original) +++ trunk/media/css/style.css Wed Mar 19 15:06:25 2008 @@ -790,6 +790,17 @@ font-size: 10px; } +#user_profile { + padding: 20px; +} +#user_profile_left { + float:left; + text-align: center; +} +#user_profile_right { + float:left; +} + /** PAGINATOR **/ .paginator { padding:.5em .75em; font:normal .8em arial; } Modified: trunk/profile/views.py ================================================================= --- trunk/profile/views.py (original) +++ trunk/profile/views.py Wed Mar 19 15:06:25 2008 @@ -70,6 +70,8 @@ def user_profile(request, name): info = get_object_or_404(User, username=name) + if not info.is_active: + del info return render_response(request, 'user/profile.html', locals()) def user_register(request): Modified: trunk/templates/user/profile.html ================================================================= --- trunk/templates/user/profile.html (original) +++ trunk/templates/user/profile.html Wed Mar 19 15:06:25 2008 @@ -3,14 +3,11 @@ {% block title %}Kullan?c?: {{ infoname }} -{% endblock %} {% block header_menu %} - - {% include "header.html" %} + {% include "header.html" %} {% endblock %}
{% block ust_menu %} - - {% include "ust_menu_ayrinti.html" %} - + {% include "ust_menu_ayrinti.html" %} {% endblock %}
@@ -19,14 +16,27 @@ {% block content %} {% if info %} - -Ad: {{ info.first_name }}
-Web: {{ info.get_profile.homepage }}
- +
+

Kullan?c? profili: {{ info }}

+
+

Avatar

+ +
+
+
    +
  • Ad: {{ info.first_name }}
  • +
  • Soyad: {{ info.last_name }}
  • +
  • Kay?t Tarihi: {{ info.date_joined }}
  • + {% if info.get_profile.show_email %}
  • E-posta: {{ info.email }}
  • {% endif %} +
  • Web: {{ info.get_profile.homepage }}
  • +
  • ?ehir: {{ info.get_profile.get_city_display }}
  • +
  • Anl?k Haberle?me: {{ info.get_profile.im }}
  • +
  • Do?um g?n?: {{ info.get_profile.birthday }}
  • +
+
+
{% else %} - B?yle bir kullan?c? yok!
- {% endif %} {% endblock %} From oi-commits at pardus.org.tr Wed Mar 19 15:30:51 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 19 Mar 2008 15:30:51 +0200 (EET) Subject: [Oi-commits] r1146 - in trunk: media/css templates/forum Message-ID: <20080319133051.4BEBA8640B4@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 19 15:30:51 2008 New Revision: 1146 Modified: trunk/media/css/forum.css trunk/templates/forum/forum_list.html Log: help for forum icons Modified: trunk/media/css/forum.css ================================================================= --- trunk/media/css/forum.css (original) +++ trunk/media/css/forum.css Wed Mar 19 15:30:51 2008 @@ -389,3 +389,18 @@ width: 40%; padding: 10px; } +#forum_icons_help { + overflow: hidden; + width: 100%; +} +#forum_icons_help_left { + float: left; + width: 40%; + padding: 10px; +} +#forum_icons_help_right { + float:right; + text-align:left; + width: 40%; + padding: 10px; +} Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Wed Mar 19 15:30:51 2008 @@ -60,4 +60,15 @@ Toplam Konu Say?s?: {{ topics }}
+
Forumdaki simgelerin anlamlar?
+
+
+ Okunmu? forum ya da konu
+ Yeni ileti var
+
+
+ Yeni iletilere kapal?
+ Sabit konu (her zaman ?stte kal?r)
+
+
{% endblock %} From oi-commits at pardus.org.tr Wed Mar 19 16:04:27 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 19 Mar 2008 16:04:27 +0200 (EET) Subject: [Oi-commits] r1147 - in trunk: media/css templates/user Message-ID: <20080319140427.D721A8640D7@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 19 16:04:27 2008 New Revision: 1147 Modified: trunk/media/css/style.css trunk/templates/user/profile.html Log: profile page is getting better Modified: trunk/media/css/style.css ================================================================= --- trunk/media/css/style.css (original) +++ trunk/media/css/style.css Wed Mar 19 16:04:27 2008 @@ -791,14 +791,16 @@ } #user_profile { - padding: 20px; + padding: 10px; } #user_profile_left { float:left; text-align: center; + padding: 10px; } #user_profile_right { float:left; + padding: 10px; } /** PAGINATOR **/ Modified: trunk/templates/user/profile.html ================================================================= --- trunk/templates/user/profile.html (original) +++ trunk/templates/user/profile.html Wed Mar 19 16:04:27 2008 @@ -17,22 +17,25 @@ {% if info %}
-

Kullan?c? profili: {{ info }}

+

{{ info }} ({{ info.date_joined|date:"d F Y" }} tarihinden beri ?ye)

Avatar

-
    -
  • Ad: {{ info.first_name }}
  • -
  • Soyad: {{ info.last_name }}
  • -
  • Kay?t Tarihi: {{ info.date_joined }}
  • - {% if info.get_profile.show_email %}
  • E-posta: {{ info.email }}
  • {% endif %} -
  • Web: {{ info.get_profile.homepage }}
  • -
  • ?ehir: {{ info.get_profile.get_city_display }}
  • -
  • Anl?k Haberle?me: {{ info.get_profile.im }}
  • -
  • Do?um g?n?: {{ info.get_profile.birthday }}
  • -
+

Ki?isel Bilgiler

+
    +
  • Ad?: {{ info.first_name }}
  • +
  • Soyad?: {{ info.last_name }}
  • +
  • ?ehir: {{ info.get_profile.get_city_display }}
  • +
  • Do?um tarihi: {{ info.get_profile.birthday|date:"d F Y" }}
  • +
+

?leti?im Bilgileri

+
    + {% if info.get_profile.show_email %}
  • E-posta: {{ info.email }}
  • {% endif %} +
  • Web: {{ info.get_profile.homepage }}
  • +
  • Jabber: {{ info.get_profile.im }}
  • +
{% else %} From oi-commits at pardus.org.tr Wed Mar 19 16:31:14 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Wed, 19 Mar 2008 16:31:14 +0200 (EET) Subject: [Oi-commits] r1148 - trunk/templates/forum Message-ID: <20080319143114.33B147C011A@liste.uludag.org.tr> Author: jnmbk Date: Wed Mar 19 16:31:13 2008 New Revision: 1148 Modified: trunk/templates/forum/forum_detail.html Log: {un}read topic tip Modified: trunk/templates/forum/forum_detail.html ================================================================= --- trunk/templates/forum/forum_detail.html (original) +++ trunk/templates/forum/forum_detail.html Wed Mar 19 16:31:13 2008 @@ -26,7 +26,7 @@ {% else %}
- +
{{ topic.posts }}
{{ topic.views }}
From oi-commits at pardus.org.tr Fri Mar 21 13:17:52 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 21 Mar 2008 13:17:52 +0200 (EET) Subject: [Oi-commits] r1149 - in trunk: media/css templates/forum Message-ID: <20080321111752.8CEBA7C0086@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 21 13:17:52 2008 New Revision: 1149 Modified: trunk/media/css/forum.css trunk/templates/forum/forum_list.html Log: 3 rows for help icons Modified: trunk/media/css/forum.css ================================================================= --- trunk/media/css/forum.css (original) +++ trunk/media/css/forum.css Fri Mar 21 13:17:52 2008 @@ -393,14 +393,8 @@ overflow: hidden; width: 100%; } -#forum_icons_help_left { +#forum_icons_help div { float: left; - width: 40%; - padding: 10px; -} -#forum_icons_help_right { - float:right; - text-align:left; - width: 40%; + width: 31%; padding: 10px; } Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Fri Mar 21 13:17:52 2008 @@ -62,13 +62,16 @@
Forumdaki simgelerin anlamlar?
-
+
Okunmu? forum ya da konu
Yeni ileti var
-
+
Yeni iletilere kapal?
- Sabit konu (her zaman ?stte kal?r)
+ Sabit (her zaman ?stte kal?r)
+
+
+ Yeni iletilere kapal? ve sabit
{% endblock %} From oi-commits at pardus.org.tr Fri Mar 21 14:59:30 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 21 Mar 2008 14:59:30 +0200 (EET) Subject: [Oi-commits] r1150 - trunk Message-ID: <20080321125930.994637C00A9@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 21 14:59:30 2008 New Revision: 1150 Modified: trunk/urls.py Log: removed unnecessary lines, and converted tabs to spaces Modified: trunk/urls.py ================================================================= --- trunk/urls.py (original) +++ trunk/urls.py Fri Mar 21 14:59:30 2008 @@ -100,12 +100,10 @@ (r'^robots.txt$', 'oi.st.views.robots'), - #comments - + #comments (r'^comments/post/$', 'oi.comments.views.post_comment'), (r'^comments/posted/$', 'oi.comments.views.comment_was_posted'), - #News #(r'^haber/yorum/(?P\d+)/$', 'oi.st.views.comment_news'), (r'^haber/yorum/(?P.*)/$', 'oi.st.views.comment_news'), @@ -113,7 +111,6 @@ (r'^haber/(?P.*)/yazdir/$', 'oi.st.views.news_printable'), (r'^haber/(?P.*)/$', 'oi.st.views.news_detail'), - #Packages (r'^paket/yorum/(?P.*)/$', 'oi.st.views.comment_package'), (r'^paket/$', 'django.views.generic.list_detail.object_list', dict(package_dict)), From oi-commits at pardus.org.tr Fri Mar 21 15:00:08 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 21 Mar 2008 15:00:08 +0200 (EET) Subject: [Oi-commits] r1151 - trunk/profile Message-ID: <20080321130008.E51047C00A9@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 21 15:00:08 2008 New Revision: 1151 Modified: trunk/profile/views.py Log: working petition in profile Modified: trunk/profile/views.py ================================================================= --- trunk/profile/views.py (original) +++ trunk/profile/views.py Fri Mar 21 15:00:08 2008 @@ -19,6 +19,7 @@ from oi.profile.models import Profile, RegisterForm, ProfileEditForm, LostPassword, LostPasswordForm, ChangePasswordForm from oi.st.wrappers import render_response +from oi.petition.models import Petitioner @login_required def user_dashboard(request): @@ -70,6 +71,8 @@ def user_profile(request, name): info = get_object_or_404(User, username=name) + numberofpetitioners = Petitioner.objects.filter(is_active=True).count() + petitionpercent = numberofpetitioners / 30 if not info.is_active: del info return render_response(request, 'user/profile.html', locals()) From oi-commits at pardus.org.tr Fri Mar 21 15:37:47 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Fri, 21 Mar 2008 15:37:47 +0200 (EET) Subject: [Oi-commits] r1152 - trunk/templates/forum Message-ID: <20080321133747.32E337C00A9@liste.uludag.org.tr> Author: jnmbk Date: Fri Mar 21 15:37:46 2008 New Revision: 1152 Modified: trunk/templates/forum/forum_list.html Log: added more tips Modified: trunk/templates/forum/forum_list.html ================================================================= --- trunk/templates/forum/forum_list.html (original) +++ trunk/templates/forum/forum_list.html Fri Mar 21 15:37:46 2008 @@ -26,7 +26,7 @@ {% if forum.hidden and not perms.forum.can_see_hidden_forums %} {% else %}
-
+
Okunmu? forum
{{ forum.name|escape }}
{{ forum.description }}
{{ forum.topics }}
{{ forum.posts }}
@@ -63,15 +63,16 @@
Forumdaki simgelerin anlamlar?
- Okunmu? forum ya da konu
- Yeni ileti var
+ Okunmu? Konu Okunmu? forum ya da konu
+ Okunmam?? Konu Yeni ileti var
- Yeni iletilere kapal?
- Sabit (her zaman ?stte kal?r)
+ Kilitli Konu Kilitli (yeni iletilere kapal?)
+ Kilitli ve Okunmam?? Konu Kilitli ve yeni ileti var
- Yeni iletilere kapal? ve sabit
+ Sabit Konu Sabit (her zaman ?stte kal?r)
+ Kilitli ve Sabit Konu Kilitli ve sabit
{% endblock %} From oi-commits at pardus.org.tr Sat Mar 22 18:42:47 2008 From: oi-commits at pardus.org.tr (oi-commits at pardus.org.tr) Date: Sat, 22 Mar 2008 18:42:47 +0200 (EET) Subject: [Oi-commits] r1153 - in trunk: profile templates/forum Message-ID: <20080322164247.CBFEB864001@liste.uludag.org.tr> Author: jnmbk Date: Sat Mar 22 18:42:47 2008 New Revision: 1153 Added: trunk/profile/forms.py Modified: trunk/profile/models.py trunk/profile/views.py trunk/templates/forum/topic.html Log: avatar and sign support (it doesn't work properly now) Modified: trunk/profile/models.py ================================================================= Suppressed! Too long (more than 250 lines) diff output suppressed... Modified: trunk/profile/views.py ================================================================= --- trunk/profile/views.py (original) +++ trunk/profile/views.py Sat Mar 22 18:42:47 2008 @@ -17,7 +17,8 @@ from oi.settings import DEFAULT_FROM_EMAIL, LOGIN_URL, WEB_URL, PROFILE_EDIT_URL -from oi.profile.models import Profile, RegisterForm, ProfileEditForm, LostPassword, LostPasswordForm, ChangePasswordForm +from oi.profile.models import Avatar, Profile, LostPassword +from oi.profile.forms import RegisterForm, ProfileEditForm, LostPasswordForm, ChangePasswordForm from oi.st.wrappers import render_response from oi.petition.models import Petitioner @@ -27,29 +28,38 @@ @login_required def user_profile_edit(request): + numberofpetitioners = Petitioner.objects.filter(is_active=True).count() + petitionpercent = numberofpetitioners / 30 u = request.user if request.method == 'POST': form = ProfileEditForm(request.POST) form.set_user(u) if form.is_valid(): -