Jump to content

Trying To Install Scode Plugin To Mt Blog


kaseytraeger

Recommended Posts

Hey all!

 

Been away from the forums for a few weeks lately. I just clicked on the link for "view new posts" and had something like 10 pages of new posts to read through! Yikes.

 

Anyway, I've finally got a bit of time to work on my personal blog instead of someone else's work. Before "going live," I've been trying to anticipate and block off any potential issues that may arise. The first thing I did was read up on optimizing my MT blog for Google. I implemented many of those suggestions. Now, I'm trying to block off as many comment spams as possible. I've read up a bit on this by visiting

h*tp://www.elise.com/mt/archives/000246concerning_spam.php

 

So far, I've installed Jay Allen's MT-Blacklist Plug-In. Now I'm trying to implement a "captcha" security code similar to what you have to do before looking up someone's registration information when you look them a URL on the whois system. I've downloaded James Seng's SCode MT-plugin and am going through the installation instructions. I don't quite understand them.

 

I can't even get through the first step where is says

1. Check if you have GD.pm installed (use the command perldoc GC). If not, download from www.cpan.org and install GD on your system

 

Does anyone know what this means? Better yet, would anyone who has already installed this plugin to their MT blog be willing to walk me through the process? I've been reading a few commentary posts on some other blogs, and from what I can tell, there are compatibility issues between MT-SCode plugin and MT-Blacklist plugin. Since I'm basically knowlegable enough to be dangerous but not knowlegable enough to be competent, I worry that I'll screw things up royally that will require tons of work to fix.

 

I'd appreciate any help available.

 

To be quite honest, I'm getting worried about using MT. I'm not a perl developer, and I'm just barely learning the concepts of the MT system. Now that MT 3.0 is out, I see that people are very unhappy with the system and Six Apart's new licensing scheme. Basically, it seems that there's been an exodus en masse to other systems by many high-profile blogs (Dive Into Mark, Zeldman, Eric Meyer, and Scripty Goddess come instantly to mind). I don't know if I should just give up on my MT blog and the hard work, learning and research I've done so far to learn it in order to take up some other blogging software or if I should stick it out and wade through the muck.

 

Goodness, what have I gotten myself into?

Link to comment
Share on other sites

GD.pm should already be installed (look in your perl modules listings in cPanel and you should see several GD:: entries).

 

I installed SCode on my MT installation a couple months ago (I've since switched to WordPress) so if you catch me online in the evening, I could help walk you through it.

Link to comment
Share on other sites

Thank you much for the info, Mike!

 

You are just one of many people who I've seen that have migrated to WP from MT. I believe TCH-Lisa migrated to TextPattern. She seems pretty happy with that decision.

 

Do you find WP to be more "intuitive" and reasonably user-friendly than MT? What prompted you to switch?

Link to comment
Share on other sites

Couple of reasons, some of which I touch on in my blog ( www.silentcorner.com ). Movable Type is a decent package, but I'm not sure I like the direction they are going in (pay to get the good stuff), nor how they are getting there (hook people on to all the fancy functionality, than suddendly start to cripple their use of the software unless they pay up). The developers have a right to make money off their product, but MT just doesn't do enough for me to go that route. Besides, I had an interest in switching to open source anyway particularly for my personal site since I'm a supporter of the open source concept.

 

WordPress is open source, and written entirely in PHP. It serves pages dynamically, which can be a plus or a minus depending on how you design your blog, but so far it seems to be very fast with generating pages as you can see in my blog (I have queries and seconds to generate the page listed in the footer). MT's drawback was for very large blogs... the rebuilds would end up being quite server intensive. I'm a bit of a hacker type (like to play with the code) so having open source is an advantage there. For ease of use, if you want a simple blog, I'd say WP is as easy as most of the "run your own" blogs get (as opposed to hosted blog publishing systems like Blogger and LiveJournal). If you are looking for a content management system (CMS), though, WP is a little less polished, and has only a fraction of the plugins available for MT currently (although I suspect WP will be getting a lot more in the near future as the plugins concept is brand new with WP introduced in the latest, still beta release . Everything before was done with less user friendly "hacks"). WP is still young, but I think we'll see it mature pretty quickly, especially with the influx of new users due to MT's changes.

 

I know Lisa likes to add all kinds of additional bells and whistles ;) and wants more CMS functionality, so she's been playing with TextPattern and ExpressionEngine, both of which look like fine packages, but not really what I'm looking for to use as my personal blog site. Those I would consider if I wanted to create a whole site (or sites), not just a weblog, with dynamic content.

Link to comment
Share on other sites

Mike,

 

I sent you a PM regarding this topic....

 

Thanks! :lol:

Link to comment
Share on other sites

OK, so I went ahead and attempted to install SCode by myself. It doesn't appear to be working because I can still enter comments without typing the required security code.

 

Here's what I did.

 

I installed the files and made the modifications required to the templates that allow comments (individual entry archive template, comment listing template, comment preview template, comment error template) and then did a complete rebuild of all files.

 

I did notice, however, that when I did a rebuild of all the pages, the following message appeared for about 1 second in the "rebuild" pop-up window:

 

Rebuilding Monthly pages 1 - 1...

 

MT::App::CMS=HASH(0x836ea78) print() on closed filehandle MT::SCode::OUTFILE at lib/MT/SCode.pm line 50.

MT::App::CMS=HASH(0x836ea78) print() on closed filehandle MT::SCode::OUTFILE at lib/MT/SCode.pm line 50.

 

Does this have something to do with why I am still able to add comments without typing in the appropriate security code?

Link to comment
Share on other sites

I have no idea about scode; I thought it required shell access to install, hrm.

 

I moved from textpattern to EE - as Mike said, I like toys *grins* I also like to use the system to manage *everything* so a CMS is more my style.

 

There're are other issues I won't elude to in this thread so that I don't go too far astray of the topic. That error probably is why it's not working, but I can't help with it as the installation instructions managed to scare me when I was running MT. :lol:

Link to comment
Share on other sites

It looks like something isn't quite right. Here's the code snippet I used in my templates if it helps:

>  <!-- Security Code Check -->
  <input type="hidden" id="code" name="code" value="<$MTSecurityCode$>" />
  <img border="0" src="<$MTCGIPath$><$MTSecurityImage$>?code=<$MTSecurityCode$>"><br />
  <input tabindex=3 id="scode" name="scode" /><br /><br />
  <!-- end of Security Code Check -->

 

Also, did you modify SCode.pm? I know there's at least one variable in there that needs to be modified:

>my $tmpdir = "/home/your-cpanel-account/tmp/mt/";

Link to comment
Share on other sites

Lisa,

 

Too bad...

 

I've tried to fix it myself, and I found a topic at the MT-plugins.com web site that talked about this post. Apparently, there's a conflict between MT-SCode and MT-Blacklist. The commenters say I need to edit a file called MTBlPost.pm, but gosh darn it if I can't find that file anywhere. I wonder if there's something else going on, or maybe another conflict that's causing my problem.

Link to comment
Share on other sites

Here's the code snippet I used in my templates if it helps:

>  <!-- Security Code Check -->
  <input type="hidden" id="code" name="code" value="<$MTSecurityCode$>" />
  <img border="0" src="<$MTCGIPath$><$MTSecurityImage$>?code=<$MTSecurityCode$>"><br />
  <input tabindex=3 id="scode" name="scode" /><br /><br />
  <!-- end of Security Code Check -->

 

Also, did you modify SCode.pm?  I know there's at least one variable in there that needs to be modified:

>my $tmpdir = "/home/your-cpanel-account/tmp/mt/";

Mike,

 

Your snippet of code looks to be verbatim of what I used.

 

However, the line I changed in SCode.pm didn't look like what you've got there. James Seng (the plugin author) had an example of

>#my $tmpdir = "/home/jseng/tmp/";
my $tmpdir = "/tmp/jseng/";

which I thought looked funny because he had his user name INSIDE the tmp directory instead of the other way around.

 

Let me redo my SCode.pm file to follow your lead and see if that doesn't work for me...

Link to comment
Share on other sites

Actually, now that I look closer at your line of code from SCode.pm, I realize that the instructions don't tell you to reference the /mt/ folder... they only say that you should reference the /tmp/ folder. Maybe that's part of the problem, too....

Link to comment
Share on other sites

Ahh.... I would have to say I never used MT-Blacklist, so I never ran into that issue.

 

And sorry, didn't read the PM first. What you had would work as well.

 

Most perl modules get installed in <MTDIR>/lib/MT/ I believe, but you could also check under extlib dirs for that blacklist .pm file.

 

Honestly though, if you have the blacklist installed and working, and you currently aren't getting spam, I would recommend just sticking with that alone. It's less intrusive to posters.

Link to comment
Share on other sites

Actually, now that I look closer at your line of code from SCode.pm, I realize that the instructions don't tell you to reference the /mt/ folder... they only say that you should reference the /tmp/ folder. Maybe that's part of the problem, too....

Well, that's not important. It just needs a place to write temporary files. I used an /mt/ folder underneath my tmp folder just for organization purposes.

Link to comment
Share on other sites

... Most perl modules get installed in <MTDIR>/lib/MT/ I believe, but you could also check under extlib dirs for that blacklist .pm file.

...

I found it located here:

/public_html/cgi-bin/mt/extlib/jayallen/MTBlPost.pm

 

I'm going to try the modifications again and see if I have any luck. Keep your fingers crossed! *nervous*

Link to comment
Share on other sites

Holy Blacklist, Batboy!

 

*doing cartwheels as she types*

 

I finally got it to work! Turns out that MT-Blacklist was indeed the culprit. I had to modify the file located at

/public_html/cgi-bin/mt/extlib/jayallen/MTBlPost.pm

in two different locations...

 

Thanks again to MikeJ and Lisa for your help and support! TCH totally rocks!

Rock Sign

Link to comment
Share on other sites

Darn it if I didn't speak too soon ... now no comments can get through the system. Yikes!

 

What to do...what to do...

 

By the way, this funny code is showing up at the bottom of my comments page...

MT::App::Comments=HASH(0x811195c) print() on closed filehandle MT::SCode::OUTFILE at lib/MT/SCode.pm line 50.

MT::App::Comments=HASH(0x811195c) print() on closed filehandle MT::SCode::OUTFILE at lib/MT/SCode.pm line 50.

 

You can all try it for yourself at h*tp://www.doggydiaries.pudgypuppy.com

 

There's only one post there. Please try adding a comment for yourself. Thanks...

Link to comment
Share on other sites

Yea, I got denied. I also got an extra error when previewing:

 

MT::App::Comments=HASH(0x8117198) Use of uninitialized value in sprintf at lib/MT/Template/Context.pm line 1187.

MT::App::Comments=HASH(0x8117198) print() on closed filehandle MT::SCode::OUTFILE at lib/MT/SCode.pm line 50.

MT::App::Comments=HASH(0x8117198) print() on closed filehandle MT::SCode::OUTFILE at lib/MT/SCode.pm line 50.

 

Something's not quite right yet in SCode land.

Link to comment
Share on other sites

Well, I did get one problem solved...the extra error line you get when trying to preview is no longer there. I read the comments that Jay Allen placed in the MTBlPost.pm file and discovered that I only need to add the SCode hack to one subroutine of the code instead of to two subroutines. I removed the extraneous hack and that got rid of the error message that said:

"Use of unitialized value in sprintf at lib/MT/Template/Context.pm at line 1187".

 

I'm still working on the rest...

Link to comment
Share on other sites

  • 1 month later...
Yea, I got denied. I also got an extra error when previewing:

 

MT::App::Comments=HASH(0x8117198) Use of uninitialized value in sprintf at lib/MT/Template/Context.pm line 1187.

MT::App::Comments=HASH(0x8117198) print() on closed filehandle MT::SCode::OUTFILE at lib/MT/SCode.pm line 50.

MT::App::Comments=HASH(0x8117198) print() on closed filehandle MT::SCode::OUTFILE at lib/MT/SCode.pm line 50.

 

Something's not quite right yet in SCode land.

These are the exact errors I'm getting.

Can either one of you help me out?

Thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...