Follow Us:


Tricked Out Mods: Forums


 Forum FAQForum FAQ   SearchSearch   UsergroupsUsergroups   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Karma Mod for Forums
 Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> RavenNuke
View previous topic :: View next topic  
Author Message
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Mon Dec 03, 2012 7:31 pm 
Post subject: Karma Mod for Forums
Reply with quote

This is a Karma mod for the forums. It is similar to the reputation mod but cooler.

Image

Image

Image

Image

The download link is here:

Karma Mod
_________________
Tricked Out News
  
Back to top
View user's profile Send private message Visit poster's website
Derek765
Blingaholic
Blingaholic


Joined: Nov 25, 2012
Posts: 20


PostPosted: Fri Dec 07, 2012 12:15 am 
Post subject:
Reply with quote

Got this mod installed, but not displaying images, just a link as shown in this picture below:
I check to make sure I had the images,php and tpl files uploaded properly at these locations:

IMAGE UPLOAD LOCATIONS
/themes/fisubice/forums/images/thumbs-up.png
/themes/fisubice/forums/images/thumbs-down.png

/modules/Forums/templates/subSilver/images/thumbs-up.png
/modules/Forums/templates/subSilver/images/thumbs-down.png

KARMA_BODY.TPL UPLOAD LOCATIONS
/modules/Forums/templates/subSilver/karma_body.tpl
/themes/fisubice/forums/karma_body.tpl

KARMA.PHP UPLOAD LOCATIONS
/modules/Forums/karma.php

Image
  
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Fri Dec 07, 2012 6:03 am 
Post subject:
Reply with quote

Try to put the image here modules/Forums/themes/fisubice/forums/images/

I have a bug in the code somewhere. You will need to add the themes/fisubice/forums/images folders with the image in it to the modules/Forums folder.
_________________
Tricked Out News
  

Last edited by bobby on Fri Dec 07, 2012 6:21 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Fri Dec 07, 2012 6:19 am 
Post subject:
Reply with quote

Since you also have the Shoutbox in the header, you will need to make a change to the modules/Shout_Box/shout.php

Open it and find:

php Code:
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $cookie, $currentlang, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang, $user_prefix, $name;

if ($name=='Forums') {


Replace it with:
php Code:
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $cookie, $currentlang, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang, $user_prefix, $name, $file;

if ($name == 'Forums' and $file != 'karma') {

_________________
Tricked Out News
  

Last edited by bobby on Fri Dec 07, 2012 6:02 pm; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Fri Dec 07, 2012 7:03 am 
Post subject:
Reply with quote

I see where the bug is. In the themes forum.cfg, the images should be

Code:
$images['icon_plus'] = "$current_template_images/thumbs-up.png";

$images['icon_minus'] = "$current_template_images/thumbs-down.png";

_________________
Tricked Out News
  
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Fri Dec 07, 2012 12:22 pm 
Post subject:
Reply with quote

Also, if you are using shortlinks, you will need to add the karma taps as well. I will post them here when I get home and have access to my test site.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message Visit poster's website
Derek765
Blingaholic
Blingaholic


Joined: Nov 25, 2012
Posts: 20


PostPosted: Fri Dec 07, 2012 4:01 pm 
Post subject:
Reply with quote

Yes it was the issue with the forums.cfg.
This fixed the images not showing up.

php Code:
$images['icon_plus'] = "$current_template_images/thumbs-up.png";

$images['icon_minus'] = "$current_template_images/thumbs-down.png";



The modules/Shout_Box/shout.php I replaced what you said with that, but looks like it was typed a little to fast, but I fixed it with this.

php Code:
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $cookie, $currentlang, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang, $user_prefix, $name, $file;

if ($name == 'Forums' AND $file = 'karma') {



Now my last couple issues, is the shout box showing when a user gives a comment about karma in the pop-up window, they have to scroll down to see the section where to give a comment, now how could I go about just showing the comments box and not the Shout Box in the pop-up window?
  
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Fri Dec 07, 2012 5:46 pm 
Post subject:
Reply with quote

OK, here are the ShortLink taps. I am having an issue with mod_rewrite on xampp so I was not able to totally test them. The one for the popup did not work for some reason.

Code:


.htaccess

RewriteRule ^forum-karma-down-([0-9]*).html modules.php?name=Forums&file=karma&u=$1&k=m [L]
RewriteRule ^forum-karma-up-([0-9]*).html modules.php?name=Forums&file=karma&u=$1&k=p [L]
RewriteRule ^forum-karma-true.html modules.php?name=Forums&file=karma&added=true [L]
RewriteRule ^forum-karma.html modules.php?name=Forums&file=karma [L]


                   GT-Forums.php

'"(?<!/)modules.php\?name=Forums&amp;file=karma&amp;u=([0-9]*)&amp;k=m"',
'"(?<!/)modules.php\?name=Forums&amp;file=karma&amp;u=([0-9]*)&amp;k=p"',
'"(?<!/)modules.php\?name=Forums&amp;file=karma&amp;added=true"',
'"(?<!/)modules.php\?name=Forums&amp;file=karma"',

'forum-karma-down-\\1.html',
'forum-karma-up-\\1.html',
'forum-karma-true.html',
'forum-karma.html',

_________________
Tricked Out News
  

Last edited by bobby on Sat Dec 08, 2012 8:24 am; edited 2 times in total
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Fri Dec 07, 2012 6:01 pm 
Post subject:
Reply with quote

You need to change
php Code:
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $cookie, $currentlang, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang, $user_prefix, $name, $file;

if ($name == 'Forums' AND $file = 'karma') {


to

php Code:
global $prefix, $ShoutSubmit, $ShoutComment, $db, $user, $cookie, $currentlang, $shoutuid, $top_content, $mid_content, $bottom_content, $ShoutMarqueewidth, $ShoutMarqueeheight, $currentlang, $user_prefix, $name, $file;

if ($name == 'Forums' and $file != 'karma') {


The exclamation mark in front of the equal sign means does not equal in php. What we are saying is If the $name variable in the url is Forums and the $file does not equal karma then do this.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message Visit poster's website
Derek765
Blingaholic
Blingaholic


Joined: Nov 25, 2012
Posts: 20


PostPosted: Fri Dec 07, 2012 10:49 pm 
Post subject:
Reply with quote

For some reason, when I added these to the GT-Forums.php, it gives my site a blank page.

php Code:
'"(?<!/)modules.php\?name=Forums&amp;file=karma&amp;u=([0-9]*)&amp;k=m"',

'"(?<!/)modules.php\?name=Forums&amp;file=karma&amp;u=([0-9]*)&amp;k=p"',
'"(?<!/)modules.php\?name=Forums&amp;file=karma&amp;added=true"',
'"(?<!/)modules.php\?name=Forums&amp;file=karma"',

'forum-karma-down-\\1.html',
'forum-karma-up-\\1.html',
'forum-karma-true.html',
'forum-karma.html',
  
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Sat Dec 08, 2012 7:45 am 
Post subject:
Reply with quote

You have to make sure they are added in the same place on both sets of rules. I put them at the top of both lists and at the top of the forum htaccess rules too. I also had some typos in the rules. I corrected them. I need to double check my stuff before I post it. Too much work and not enough coffee.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message Visit poster's website
Derek765
Blingaholic
Blingaholic


Joined: Nov 25, 2012
Posts: 20


PostPosted: Sat Dec 08, 2012 10:41 am 
Post subject:
Reply with quote

Seems to be fixed now after adding both rules at top of each list.
You got a .htaccess file in your /modules/Forums/ directory or /themes/THEME/forums/ directory?
  
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Sat Dec 08, 2012 10:51 am 
Post subject:
Reply with quote

The only .htaccess file that needs the ShortLink rules added to it is the one in the root of your site. Along with the other rules from ShortLinks.htaccess.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message Visit poster's website
bobby
Site Admin
Site Admin


Joined: Jan 20, 2009
Posts: 812


PostPosted: Sat Dec 08, 2012 10:54 am 
Post subject:
Reply with quote

Don't forget to add the changes to the shout.php to remove it from the colorboxes.
_________________
Tricked Out News
  
Back to top
View user's profile Send private message Visit poster's website
Derek765
Blingaholic
Blingaholic


Joined: Nov 25, 2012
Posts: 20


PostPosted: Sat Dec 08, 2012 10:58 am 
Post subject:
Reply with quote

Alright, sorry you explained it like you had a .htaccess file in those directorys.
Now what is the point in having these rules written at the top of all three lists?

The .htaccess written rules will be all read the same way no matter what order correct?
  
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic   print    Tricked Out News Forum Index -> RavenNuke All times are GMT - 5 Hours
 Goto page 1, 2, 3  Next
 Page 1 of 3
 
 

Jump to:   
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001-2008 phpBB Group
Forums ©