Good Post/Bad Post Mod

Started by OutofOrder, June 17, 2009, 10:08:41 AM

Previous topic - Next topic

Sabre™

Quote from: OutofOrder on June 26, 2009, 12:06:59 PM
And it's done. :) Mod updated, added support for SMF 1.1.9.

Awesome!!  Thanks mate :)

Display.php
change

img_gpbp_up=new Image;img_gpbp_up.src=smf_images_url+"/images/gpbp_arrow_up.gif";img_gpbp_up_lit=new Image;img_gpbp_up_lit.src=smf_images_url+"/images/gpbp_arrow_up_lit.gif";img_gpbp_down=new Image;img_gpbp_down.src=smf_images_url+"/images/gpbp_arrow_down.gif";img_gpbp_down_lit=new Image;img_gpbp_down_lit.src=smf_images_url+"/images/gpbp_arrow_down.png";

to
img_gpbp_up=new Image;img_gpbp_up.src=smf_images_url+"/gpbp_arrow_up.gif";img_gpbp_up_lit=new Image;img_gpbp_up_lit.src=smf_images_url+"/gpbp_arrow_up_lit.gif";img_gpbp_down=new Image;img_gpbp_down.src=smf_images_url+"/gpbp_arrow_down.gif";img_gpbp_down_lit=new Image;img_gpbp_down_lit.src=smf_images_url+"/gpbp_arrow_down.gif";

;)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


marciano

Quote from: Sabre™ on June 26, 2009, 06:52:07 PM
Quote from: OutofOrder on June 26, 2009, 12:06:59 PM
And it's done. :) Mod updated, added support for SMF 1.1.9.

Awesome!!  Thanks mate :)

Display.php
change

img_gpbp_up=new Image;img_gpbp_up.src=smf_images_url+"/images/gpbp_arrow_up.gif";img_gpbp_up_lit=new Image;img_gpbp_up_lit.src=smf_images_url+"/images/gpbp_arrow_up_lit.gif";img_gpbp_down=new Image;img_gpbp_down.src=smf_images_url+"/images/gpbp_arrow_down.gif";img_gpbp_down_lit=new Image;img_gpbp_down_lit.src=smf_images_url+"/images/gpbp_arrow_down.png";

to
img_gpbp_up=new Image;img_gpbp_up.src=smf_images_url+"/gpbp_arrow_up.gif";img_gpbp_up_lit=new Image;img_gpbp_up_lit.src=smf_images_url+"/gpbp_arrow_up_lit.gif";img_gpbp_down=new Image;img_gpbp_down.src=smf_images_url+"/gpbp_arrow_down.gif";img_gpbp_down_lit=new Image;img_gpbp_down_lit.src=smf_images_url+"/gpbp_arrow_down.gif";

;)


para que ese cambio?

Sabre™

It is for the code written for smf 1.1.9

The first code points to a folder in the images folder named "images", which does not exist.
It would only work if the previous code were  src=smf_default_theme_url+"/images/gpbp_arrow_up.gif etc etc..
or by removing the search for the second images folder, as shown above.

Also changing gpbp_arrow_down.png to gpbp_arrow_down.gif


This got the "hide and shade" feature working for my custom themes.

Display.php
Changed
// Perhaps we'll just use the default template, then...
elseif (file_exists($settings['default_theme_dir'] . '/' . $template_name . '.template.php'))
$context['html_headers'] = '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/gpbp.css' . '" />';


to
// Perhaps we'll just use the default template, then...
elseif (file_exists($settings['default_theme_dir'] . '/gpbp.css'))
$context['html_headers'] = '
<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/gpbp.css' . '" />';


It may help for others experiencing problems with it displaying on their custom themes also :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


heinandar

Hi...
I want to show ' who vote this post' like thank you mod. How can i code that.
Anyone can help?

OutofOrder

Quote from: Sabre™ on June 26, 2009, 06:52:07 PM
Quote from: OutofOrder on June 26, 2009, 12:06:59 PM
And it's done. :) Mod updated, added support for SMF 1.1.9.

Awesome!!  Thanks mate :)

Display.php
change

img_gpbp_up=new Image;img_gpbp_up.src=smf_images_url+"/images/gpbp_arrow_up.gif";img_gpbp_up_lit=new Image;img_gpbp_up_lit.src=smf_images_url+"/images/gpbp_arrow_up_lit.gif";img_gpbp_down=new Image;img_gpbp_down.src=smf_images_url+"/images/gpbp_arrow_down.gif";img_gpbp_down_lit=new Image;img_gpbp_down_lit.src=smf_images_url+"/images/gpbp_arrow_down.png";

to
img_gpbp_up=new Image;img_gpbp_up.src=smf_images_url+"/gpbp_arrow_up.gif";img_gpbp_up_lit=new Image;img_gpbp_up_lit.src=smf_images_url+"/gpbp_arrow_up_lit.gif";img_gpbp_down=new Image;img_gpbp_down.src=smf_images_url+"/gpbp_arrow_down.gif";img_gpbp_down_lit=new Image;img_gpbp_down_lit.src=smf_images_url+"/gpbp_arrow_down.gif";

;)

Oops. Thanks for pointing it out!

Quote from: heinandar on June 27, 2009, 08:36:17 AM
Hi...
I want to show ' who vote this post' like thank you mod. How can i code that.
Anyone can help?
Some guidelines: You can do that by fetching the voters list from the log_gpbp table. Search for votes for each message from distinct id_member fields (the voters). Gather them in an array (per message), then display them in your theme :)

heinandar



Quote from: heinandar on June 27, 2009, 08:36:17 AM
Hi...
I want to show ' who vote this post' like thank you mod. How can i code that.
Anyone can help?
Some guidelines: You can do that by fetching the voters list from the log_gpbp table. Search for votes for each message from distinct id_member fields (the voters). Gather them in an array (per message), then display them in your theme :)
[/quote]
Thanks for your reply. I can't do it by myself because i'm not a programmer and i don't know php well.
So pls... if you have time, pls help me.
Many Thanks

Paracelsus

Quote from: heinandar on June 27, 2009, 08:36:17 AM
Hi...
I want to show ' who vote this post' like thank you mod. How can i code that.
Anyone can help?

That would be nice... I'll wait for some programmer to patch this up.


Btw OutofOrder, there should exist a permission to allow / disallow to receive votes in posts. For example, if I want to avoid that Admin posts be hidden, it should be possible to select this group NOT to receive votes in their posts.

Paracelsus

The MOD works well in 1.1.9, although I had to make several changes in Display.Template.php due to the custom theme I'm using.

Still I get this error in Firebug's console:
PostVoting is not defined
var oVotePost = new PostVoting({

OutofOrder

Quote from: Paracelsus on June 29, 2009, 12:07:29 PM
The MOD works well in 1.1.9, although I had to make several changes in Display.Template.php due to the custom theme I'm using.

Still I get this error in Firebug's console:
PostVoting is not defined
var oVotePost = new PostVoting({
Please check in Firebug that the browser has correctly loaded the gpbp.js file. If this is the case, clear your cache and reload the page.
You can do the check by going to the "Script" tab, then clicking on the script url (it will drop down the list of every JS scripts loaded) and selecting "gpbp.js". If it didn't load it properly, it will show an empty script.

OutofOrder

Quote from: heinandar on June 29, 2009, 01:44:41 AM
Quote from: OutofOrder on June 28, 2009, 06:27:32 PM
Quote from: heinandar on June 27, 2009, 08:36:17 AM
Hi...
I want to show ' who vote this post' like thank you mod. How can i code that.
Anyone can help?
Some guidelines: You can do that by fetching the voters list from the log_gpbp table. Search for votes for each message from distinct id_member fields (the voters). Gather them in an array (per message), then display them in your theme :)
Thanks for your reply. I can't do it by myself because i'm not a programmer and i don't know php well.
So pls... if you have time, pls help me.
Many Thanks
Can you please show me a screenshot of the Thank you mod in action, displaying who used it?
I'm not sure how to add a list (that may be really long if the forum is active enough) and display it without disrupting the thread page or that turns out annoying for the user.


Sabre™

You could make it permission based  eg.. only admins and/or mods can see who voted.
And to keep the board/thread clean, make it a dropdown so they are only viewable when clicked.

Just throwing in ideas ;)

Edit
You could look at [THIS] for an idea :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Paracelsus

Quote from: OutofOrder on June 29, 2009, 08:57:40 PM
Quote from: Paracelsus on June 29, 2009, 12:07:29 PM
The MOD works well in 1.1.9, although I had to make several changes in Display.Template.php due to the custom theme I'm using.

Still I get this error in Firebug's console:
PostVoting is not defined
var oVotePost = new PostVoting({
Please check in Firebug that the browser has correctly loaded the gpbp.js file. If this is the case, clear your cache and reload the page.
You can do the check by going to the "Script" tab, then clicking on the script url (it will drop down the list of every JS scripts loaded) and selecting "gpbp.js". If it didn't load it properly, it will show an empty script.

You're right, it hasn't loaded gpbp.js file at all. The other scripts I run are related to google analytics and gfeedfetcher.js from DynamicDrive. Can it be a conflict between some of these scripts?

djkmmo

Hi!

I just installed this mod and it seems great. It's just one tiny thing: it fills up my error log with the following message:

8: Undefined variable: template_name
Fil: /home/djkmmo/gnubuntu.co.cc/forum/Sources/Display.php
Rad: 102


Line 102 is:
      elseif (file_exists($settings['default_theme_dir'] . '/' . $template_name . '.template.php'))

Sabre™

Youre using smf 1.1.9 and a custom theme?
You could change that line to
      elseif (file_exists($settings['default_theme_dir'] . '/gpbp.css'))

There maybe another way to correct the error, but until someone mentions it, this is the way.
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


djkmmo

Quote from: Sabre™ on June 30, 2009, 05:19:00 AM
Youre using smf 1.1.9 and a custom theme?
You could change that line to
      elseif (file_exists($settings['default_theme_dir'] . '/gpbp.css'))

There maybe another way to correct the error, but until someone mentions it, this is the way.

Ok, but that has other side effects on the custom theme. The arrows and news banner is missplaced when I replace line 102 with that.

Sabre™

hmmm ok..
Remove that code and put the other back then, you'll have to wait for OutofOrder to look into it.
It worked well on each theme I used, which is why I mentioned it.

Good luck :)
Do NOT give admin and/or ftp details to just anybody, see if they are trust worthy first!!  Do your homework ;)


Sevgiformu.com

Very nice mod. thank you.

turkish translate.

./Themes/default/languages/Help.turkish.php

Find.

?>

Add Before.

// Good Post/Bad Post mod strings
$helptxt['gpbp_threshold'] = 'Her kullanıcı bağlı olarak \ 'Tema ve Düzen yapılandırması vardır, bu Modifiyeyi , git, ya da tümünü (tneden olabilir hata ?) silik görüntüleniyorsa. <br /> <br /> <b> Tekraklama yapma mesjalarda, normal haline geri dön.</b>';
$helptxt['gpbp_display_respect'] = 'Konudun Kalitesi İçin Kullanılan Oylama sistemidir, her konu ayrı değerlendirilir.';




./Themes/default/languages/Who.turkish.php

Find.

?>

Add Before.

// Good Post/Bad Post: it may be nice to let users know of this.
$txt['whotopic_gpbp'] = 'Oylama Bir İleti İçindir &quot;<a href="' . $scripturl . '?topic=%d.0">%s</a>&quot;.';





./Themes/default/languages/Modifications.turkish.php

Find.

?>

Add Before.

// Good Post/Bad Post permission strings.
$txt['permissiongroup_gpbp'] = 'Güzel Mesaj/Kötü Mesaj Modifikasyonu';
$txt['permissionname_gpbp_manage'] = 'Güzel Mesaj/Kötü Mesaj Modifikasyonu Ayarları';
$txt['permissionhelp_gpbp_manage'] = 'İzin ver';
$txt['cannot_gpbp_manage'] = 'Derecelendirmeye izin verilmesi.';
$txt['permissionname_gpbp_vote'] = 'Mesajlara Oyla (yukarı veya aşağı)';
$txt['permissionhelp_gpbp_vote'] = 'Olumlu veya olumsuz bir yazının sonucu değiştirmek için kullanım sağlar. Kurul da yapılandırılmış olması gerekir yazı oylama izin vermek gerekir. <br/> <br/> <strong> Not </ strong>: Konuyu Ziyaretçilerin Oylamasına \ 'izin ver';
$txt['cannot_gpbp_vote'] = 'Maalesef, mesaj oylama izniniz yok.';
$txt['permissionname_gpbp_reveal'] = 'Kötü mesajlar';
$txt['permissionhelp_gpbp_reveal'] = 'kullanıcı mesajları bir düşük oy skor nedeniyle gizli olduğunu görmek için.';
$txt['cannot_gpbp_reveal'] = 'genel oylama tarafından gizli erişim olamaz.';
// Managing area.
$txt['gpbp_manage'] = 'İyi mesaj/Kötü Mesaj';
$txt['gpbp_manage_title'] = 'Güzel Mesaj/Kötü Mesaj Yönetme';
$txt['gpbp_hide_action'] = 'Güzel Mesaj/Kötü Mesaj: ne yapmak istiyorsun?';
$txt['gpbp_hide_action_hide'] = 'Gizle.';
$txt['gpbp_hide_action_grey'] = 'Grileştir.';
$txt['gpbp_hide_action_none'] = 'Hiç birşey yapma.';
$txt['gpbp_settings'] = 'Güzel Mesaj/Kötü Mesaj (GP/BP) Ayarlar';
$txt['gpbp_bad_threshold'] = 'Kötü Mesaj Eşiğinde';
$txt['gpbp_bad_threshold_desc'] = 'Bu değeri şu anda herhangi bir yazı ya da aşağıdaki Kötü Mesaj olarak işaretlenir.';
$txt['gpbp_show_respect'] = ''Göster Dereceyi';
$txt['gpbp_show_respect_desc'] = 'Profil Özetinde Göster Derecelerini.';
$txt['gpbp_enable_boards'] = 'Etkinleştir GP/BP Kurallarda';
$txt['gpbp_enable_boards_desc'] = 'oylama olacak olan Komiteleri seçin. <br /> <br /> <strong> Not: </ strong> Yazı silindi asla oy verilmedi. Yeniden bir konu gönderilmesi oylama sağlayarak sadece önceki oy görüntülemeye yol açacak.';
$txt['gpbp_choose_boards'] = 'Seçebileceğiniz Yer';
$txt['gpbp_display_stats'] = 'İstatistiklerde Aktifleştir?';
$txt['gpbp_display_stats_desc'] = 'Görüntü Seçin <strong>Top 10 Mesaj Puanı</strong> listesi ve  <strong>10 En İyi Mesaj</strong> users.';
$txt['gpbp_users_choice'] = 'Kullanıcıların GP/BP kendi ayarları';
$txt['gpbp_users_choice_desc'] = 'Bu seçeneği üyeleri kendi ayarlarını seçmek için izin vermek için kontrol edin (gri gizlemek aşımı, hiçbir şey), ya da işaretini kaldırın Geçerli ayarları gücüne. <br /> <strong> Üye Seçenekler giderek geçerli tema ayarlarını değiştirebilirsiniz < Temalar yönetimi alanında / strong> bölümünde.';
$txt['gpbp_users_choice_none'] = 'kullanıcılar için tercih "Oysuz" Kötü Yayın';
$txt['gpbp_users_choice_none_desc'] = 'Kötü görüntülemeye izin vermeyi denetleyin Normal mesaj olarak Yayınlar. Bu bir tercihdir seçenekler geçersiz değildir, bu nedenle, yine de tamamen devre dışı bırakmak için üye tema seçenekleri düzenlemek zorunda.';
// Voting errors.
$txt['gpbp_lacks_msg'] = 'Belirttiğiniz (geçerli) mesajı puanla.';
$txt['gpbp_notinthisboard'] = 'Maalesef, bu kurulu değil \'t sonrası oylama etkinleştirdiyseniz.';
$txt['gpbp_msg_not_found'] = 'Belirttiğiniz Mesaj bulunamadı.';
$txt['gpbp_msg_own_voted'] = 'Üzgünüm, kendi yazılarına\'t oy veremessin.';
// General user interface.
$txt['gpbp_respect'] = 'Derece';
$txt['gpbp_post_score'] = 'Bu Yazının Şuanki Puanı.';
$txt['gpbp_vote_down'] = 'Kötü';
$txt['gpbp_vote_up'] = 'İyi';
$txt['gpbp_voted_down_alt'] = 'Oy Aşağı.';
$txt['gpbp_voted_up_alt'] = 'Oy Yukarı.';
$txt['gpbp_voted_down'] = 'Bu yazıya Kötü oy var. Tıklayınız .';
$txt['gpbp_to_vote_down'] = 'Bu yazının kötü oylaması.';
$txt['gpbp_voted_up'] = 'Bu yazıya İyi oy var. Tıklayınız.';
$txt['gpbp_to_vote_up'] = 'Bu yazının iyi oylaması.';
$txt['gpbp_hidden'] = 'Gizle.';
$txt['gpbp_show'] = 'Göster Yazıları.';
$txt['gpbp_member_hide_action'] = 'Oy lanan: mesajlar puanlama ile ne yapmak <strong>%s</strong> istiyorsun?';
$txt['gpbp_top_voters'] = 'Top 10 Mesajlar';
$txt['gpbp_most_respected'] = '10 En iyi Mesaj';




./Themes/default/languages/Help.turkish-utf8.php

Find.

?>

Add Before.

// Good Post/Bad Post mod strings
$helptxt['gpbp_threshold'] = 'Her kullanıcı bağlı olarak \ 'Tema ve Düzen yapılandırması vardır, bu Modifiyeyi , git, ya da tümünü (tneden olabilir hata ?) silik görüntüleniyorsa. <br /> <br /> <b> Tekraklama yapma mesjalarda, normal haline geri dön.</b>';
$helptxt['gpbp_display_respect'] = 'Konudun Kalitesi İçin Kullanılan Oylama sistemidir, her konu ayrı değerlendirilir.';




./Themes/default/languages/Who.turkish-utf8.php

Find.

?>

Add Before.

// Good Post/Bad Post: it may be nice to let users know of this.
$txt['whotopic_gpbp'] = 'Oylama Bir İleti İçindir &quot;<a href="' . $scripturl . '?topic=%d.0">%s</a>&quot;.';





./Themes/default/languages/Modifications.turkish-utf8.php

Find.

?>

Add Before.

// Good Post/Bad Post permission strings.
$txt['permissiongroup_gpbp'] = 'Güzel Mesaj/Kötü Mesaj Modifikasyonu';
$txt['permissionname_gpbp_manage'] = 'Güzel Mesaj/Kötü Mesaj Modifikasyonu Ayarları';
$txt['permissionhelp_gpbp_manage'] = 'İzin ver';
$txt['cannot_gpbp_manage'] = 'Derecelendirmeye izin verilmesi.';
$txt['permissionname_gpbp_vote'] = 'Mesajlara Oyla (yukarı veya aşağı)';
$txt['permissionhelp_gpbp_vote'] = 'Olumlu veya olumsuz bir yazının sonucu değiştirmek için kullanım sağlar. Kurul da yapılandırılmış olması gerekir yazı oylama izin vermek gerekir. <br/> <br/> <strong> Not </ strong>: Konuyu Ziyaretçilerin Oylamasına \ 'izin ver';
$txt['cannot_gpbp_vote'] = 'Maalesef, mesaj oylama izniniz yok.';
$txt['permissionname_gpbp_reveal'] = 'Kötü mesajlar';
$txt['permissionhelp_gpbp_reveal'] = 'kullanıcı mesajları bir düşük oy skor nedeniyle gizli olduğunu görmek için.';
$txt['cannot_gpbp_reveal'] = 'genel oylama tarafından gizli erişim olamaz.';
// Managing area.
$txt['gpbp_manage'] = 'İyi mesaj/Kötü Mesaj';
$txt['gpbp_manage_title'] = 'Güzel Mesaj/Kötü Mesaj Yönetme';
$txt['gpbp_hide_action'] = 'Güzel Mesaj/Kötü Mesaj: ne yapmak istiyorsun?';
$txt['gpbp_hide_action_hide'] = 'Gizle.';
$txt['gpbp_hide_action_grey'] = 'Grileştir.';
$txt['gpbp_hide_action_none'] = 'Hiç birşey yapma.';
$txt['gpbp_settings'] = 'Güzel Mesaj/Kötü Mesaj (GP/BP) Ayarlar';
$txt['gpbp_bad_threshold'] = 'Kötü Mesaj Eşiğinde';
$txt['gpbp_bad_threshold_desc'] = 'Bu değeri şu anda herhangi bir yazı ya da aşağıdaki Kötü Mesaj olarak işaretlenir.';
$txt['gpbp_show_respect'] = ''Göster Dereceyi';
$txt['gpbp_show_respect_desc'] = 'Profil Özetinde Göster Derecelerini.';
$txt['gpbp_enable_boards'] = 'Etkinleştir GP/BP Kurallarda';
$txt['gpbp_enable_boards_desc'] = 'oylama olacak olan Komiteleri seçin. <br /> <br /> <strong> Not: </ strong> Yazı silindi asla oy verilmedi. Yeniden bir konu gönderilmesi oylama sağlayarak sadece önceki oy görüntülemeye yol açacak.';
$txt['gpbp_choose_boards'] = 'Seçebileceğiniz Yer';
$txt['gpbp_display_stats'] = 'İstatistiklerde Aktifleştir?';
$txt['gpbp_display_stats_desc'] = 'Görüntü Seçin <strong>Top 10 Mesaj Puanı</strong> listesi ve  <strong>10 En İyi Mesaj</strong> users.';
$txt['gpbp_users_choice'] = 'Kullanıcıların GP/BP kendi ayarları';
$txt['gpbp_users_choice_desc'] = 'Bu seçeneği üyeleri kendi ayarlarını seçmek için izin vermek için kontrol edin (gri gizlemek aşımı, hiçbir şey), ya da işaretini kaldırın Geçerli ayarları gücüne. <br /> <strong> Üye Seçenekler giderek geçerli tema ayarlarını değiştirebilirsiniz < Temalar yönetimi alanında / strong> bölümünde.';
$txt['gpbp_users_choice_none'] = 'kullanıcılar için tercih "Oysuz" Kötü Yayın';
$txt['gpbp_users_choice_none_desc'] = 'Kötü görüntülemeye izin vermeyi denetleyin Normal mesaj olarak Yayınlar. Bu bir tercihdir seçenekler geçersiz değildir, bu nedenle, yine de tamamen devre dışı bırakmak için üye tema seçenekleri düzenlemek zorunda.';
// Voting errors.
$txt['gpbp_lacks_msg'] = 'Belirttiğiniz (geçerli) mesajı puanla.';
$txt['gpbp_notinthisboard'] = 'Maalesef, bu kurulu değil \'t sonrası oylama etkinleştirdiyseniz.';
$txt['gpbp_msg_not_found'] = 'Belirttiğiniz Mesaj bulunamadı.';
$txt['gpbp_msg_own_voted'] = 'Üzgünüm, kendi yazılarına\'t oy veremessin.';
// General user interface.
$txt['gpbp_respect'] = 'Derece';
$txt['gpbp_post_score'] = 'Bu Yazının Şuanki Puanı.';
$txt['gpbp_vote_down'] = 'Kötü';
$txt['gpbp_vote_up'] = 'İyi';
$txt['gpbp_voted_down_alt'] = 'Oy Aşağı.';
$txt['gpbp_voted_up_alt'] = 'Oy Yukarı.';
$txt['gpbp_voted_down'] = 'Bu yazıya Kötü oy var. Tıklayınız .';
$txt['gpbp_to_vote_down'] = 'Bu yazının kötü oylaması.';
$txt['gpbp_voted_up'] = 'Bu yazıya İyi oy var. Tıklayınız.';
$txt['gpbp_to_vote_up'] = 'Bu yazının iyi oylaması.';
$txt['gpbp_hidden'] = 'Gizle.';
$txt['gpbp_show'] = 'Göster Yazıları.';
$txt['gpbp_member_hide_action'] = 'Oy lanan: mesajlar puanlama ile ne yapmak <strong>%s</strong> istiyorsun?';
$txt['gpbp_top_voters'] = 'Top 10 Mesajlar';
$txt['gpbp_most_respected'] = '10 En iyi Mesaj';

Paracelsus

Quote from: djkmmo on June 30, 2009, 05:12:34 AM
Hi!

I just installed this mod and it seems great. It's just one tiny thing: it fills up my error log with the following message:

8: Undefined variable: template_name
Fil: /home/djkmmo/gnubuntu.co.cc/forum/Sources/Display.php
Rad: 102


Line 102 is:
      elseif (file_exists($settings['default_theme_dir'] . '/' . $template_name . '.template.php'))

I commented that out and it worked for me, like this:

// elseif (file_exists($settings['default_theme_dir'] . '/' . $template_name . '.template.php'))
// $context['html_headers'] = '
//<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/gpbp.css' . '" />';


Of course, I've assured first that gpbp.css was in my custom theme directory.

djkmmo

Quote from: Paracelsus on June 30, 2009, 07:28:35 AM
I commented that out and it worked for me, like this:

// elseif (file_exists($settings['default_theme_dir'] . '/' . $template_name . '.template.php'))
// $context['html_headers'] = '
//<link rel="stylesheet" type="text/css" href="' . $settings['default_theme_url'] . '/gpbp.css' . '" />';


Of course, I've assured first that gpbp.css was in my custom theme directory.

That seems to have made it. Thanks!

Paracelsus

Quote from: Paracelsus on June 30, 2009, 03:27:14 AM
Quote from: OutofOrder on June 29, 2009, 08:57:40 PM
Quote from: Paracelsus on June 29, 2009, 12:07:29 PM
The MOD works well in 1.1.9, although I had to make several changes in Display.Template.php due to the custom theme I'm using.

Still I get this error in Firebug's console:
PostVoting is not defined
var oVotePost = new PostVoting({
Please check in Firebug that the browser has correctly loaded the gpbp.js file. If this is the case, clear your cache and reload the page.
You can do the check by going to the "Script" tab, then clicking on the script url (it will drop down the list of every JS scripts loaded) and selecting "gpbp.js". If it didn't load it properly, it will show an empty script.

You're right, it hasn't loaded gpbp.js file at all. The other scripts I run are related to google analytics and gfeedfetcher.js from DynamicDrive. Can it be a conflict between some of these scripts?

Found a solution, putting the gpbp.js script call in Display.template.php instead of Display.php.

Btw, I'm having trouble getting the script to show/hide what I want in my custom theme. In attachment is my display.template.php so you can take a look if you have the time. There are 2 problems: one is the fact that the message doesn't get hidden and the second is thast, even if I get it hidden (by placing some class code back and forth in different table td's), the link to unhide doesn't work (the only thing you get to unhide is actually the message ['id'] part).

Advertisement: