|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
Okay, this should do the trick according to what your wishes were. You can totally forget worrying about setting Guest permissions for anything. You can revert all Guest permissions back to stock, and this modification alone will do the trick. Give it a shot and let me know if I got it right. Open up your copy of ubbthreads.php in the root folder. find: if (!isset($user['USER_ID']) || !$user['USER_ID']) {
if (array_get($init, 'regonly', 0) == 1) {
$fatal_error = true;
$fatal_error_msg = "FATAL_NOT_LOGGED";
} }
replace with: if (!isset($user['USER_ID']) || !$user['USER_ID']) {
if (($ubb != "newuser") && ($ubb != "faq") && ($ubb != "boardrules") && ($ubb != "login") && ($ubb != "logout") && ($ubb != "start_page") && ($ubb != "adduser")) {
$fatal_error = true;
$fatal_error_msg = "FATAL_NOT_LOGGED";
} }
find: if (isset($left_column_data['template'])) {
smartyDisplay($left_column_data);
} if (isset($smarty_display['body'])) {
$smarty->register_outputfilter("graemlin_url");
smartyDisplay($smarty_display['body']);
} if (isset($right_column_data['template'])) {
smartyDisplay($right_column_data);
}
replace with: if ((isset($user['USER_ID'])) && ($user['USER_ID'])) {
if (isset($left_column_data['template'])) {
smartyDisplay($left_column_data);
} } if (isset($smarty_display['body'])) {
$smarty->register_outputfilter("graemlin_url");
smartyDisplay($smarty_display['body']);
} if ((isset($user['USER_ID'])) && ($user['USER_ID'])) {
if (isset($right_column_data['template'])) {
smartyDisplay($right_column_data);
} }
Enjoy.
Last edited by Gizmo; 03/01/2009 12:13 AM.
|
|
|
|
Joined: Jun 2006
Posts: 33
newbie
|
newbie
Joined: Jun 2006
Posts: 33 |
Appears to work perfectly! Mucho thanks.
|
|
|
|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
Glad I could be of assistance.
|
|
|
|
Joined: Dec 2003
Posts: 6,628 Likes: 85
|
Joined: Dec 2003
Posts: 6,628 Likes: 85 |
A hack is fine if people are willing to do so on each version change. But the reason for my post in this forum was a suggestion to get this migrated into a permanent CP option.
Last edited by Ruben; 02/25/2009 3:09 PM.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
Baby steps man, it takes more coding to integrate these things into the CP. I wanted to get this out to him as quickly as I could so he could begin implementing it. Once finals are over this week, I'll have more time to tinker with things. Plus, you don't usually have to re-implement on version changes. I just pull up my copy of BeyondCompare and copy over the changed stock code, leaving my modifications alone.
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
i still advocate for modifying the stock ubbthreads.php and add some pre and post hooks in, so we don't need to modify ANY stock code at all! we do the _run and _gpc now, but there should be a way to add in mods to the ubbt-engine... that would allow easily added features in a ../add-ons directory and not interfere in upgrades.. right now, upgrades cause pain for this reason.. Beyond Compare makes it easier, but it's really something that isn't NECESSARY given a more flexible "ubb=xxx" engine
|
|
|
|
Joined: Jun 2006
Posts: 33
newbie
|
newbie
Joined: Jun 2006
Posts: 33 |
|
|
|
|
Joined: Dec 2003
Posts: 6,628 Likes: 85
|
Joined: Dec 2003
Posts: 6,628 Likes: 85 |
So back to my original post. Add this to the list.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
Sorry about that. I do my testing on my laptop, and don't have ImageMagick or GD2 installed. I never use captcha on my Website, so I never thought to install either of those locally. Anywho, I made some changes that should fix it. Here are the entire instructions with the changes implemented. Open up your copy of ubbthreads.php in the root folder. find: if (!isset($user['USER_ID']) || !$user['USER_ID']) {
if (array_get($init, 'regonly', 0) == 1) {
$fatal_error = true;
$fatal_error_msg = "FATAL_NOT_LOGGED";
} }
replace with: if (!isset($user['USER_ID']) || !$user['USER_ID']) {
if (($ubb != "newuser") && ($ubb != "faq") && ($ubb != "boardrules") && ($ubb != "login") && ($ubb != "logout") && ($ubb != "start_page") && ($ubb != "adduser") && ($ubb != "captcha")) {
$fatal_error = true;
$fatal_error_msg = "FATAL_NOT_LOGGED";
} }
find: if (isset($left_column_data['template'])) {
smartyDisplay($left_column_data);
} if (isset($smarty_display['body'])) {
$smarty->register_outputfilter("graemlin_url");
smartyDisplay($smarty_display['body']);
} if (isset($right_column_data['template'])) {
smartyDisplay($right_column_data);
}
replace with: if ((isset($user['USER_ID'])) && ($user['USER_ID'])) {
if (isset($left_column_data['template'])) {
smartyDisplay($left_column_data);
} } if (isset($smarty_display['body'])) {
$smarty->register_outputfilter("graemlin_url");
smartyDisplay($smarty_display['body']);
} if ((isset($user['USER_ID'])) && ($user['USER_ID'])) {
if (isset($right_column_data['template'])) {
smartyDisplay($right_column_data);
} }
|
|
|
|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
Tested and verified that Captcha works with this method.
|
|
|
|
Joined: Jun 2006
Posts: 33
newbie
|
newbie
Joined: Jun 2006
Posts: 33 |
DLWebmaestro:
I opened things up this evening on my board and immediately ran into one more snag with this hack; I think it is probably the last one. I have e-mail verification turned on, and when the new member clicks on the verification link they get a fatal error. I'm back to using the stock code.
I think I know what I would need to add, but I would rather not guess, and the full code in this thread should be fixed anyway.
Thanks again for your work on this one!
|
|
|
|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
Replace: if (($ubb != "newuser") && ($ubb != "faq") && ($ubb != "boardrules") && ($ubb != "login") && ($ubb != "logout") && ($ubb != "start_page") && ($ubb != "adduser") && ($ubb != "captcha")) {
with: if (($ubb != "newuser") && ($ubb != "faq") && ($ubb != "boardrules") && ($ubb != "login") && ($ubb != "logout") && ($ubb != "start_page") && ($ubb != "adduser") && ($ubb != "captcha") && ($ubb != "verifyemail")) {
Learning as we go! I would fix the full code, but the edit time has long passed. I'm working on getting this fully CPed down to all the nitty gritties.
|
|
|
|
Joined: Jun 2006
Posts: 33
newbie
|
newbie
Joined: Jun 2006
Posts: 33 |
That was quick! I will implement/test it tomorrow.
|
|
|
|
Joined: Jun 2006
Posts: 9,242 Likes: 1
Former Developer
|
Former Developer
Joined: Jun 2006
Posts: 9,242 Likes: 1 |
i still advocate for modifying the stock ubbthreads.php and add some pre and post hooks in, so we don't need to modify ANY stock code at all!
we do the _run and _gpc now, but there should be a way to add in mods to the ubbt-engine... I'll definitely be working on getting a hook system in for 8.0. I still have to figure out the nitty gritties, and then we'll need to figure out where all the hooks need to be, documented, etc.
|
|
|
|
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
|
Pooh-Bah
Joined: Dec 2003
Posts: 1,796 |
Sweet!
|
|
|
|
Joined: Dec 2003
Posts: 6,628 Likes: 85
|
Joined: Dec 2003
Posts: 6,628 Likes: 85 |
Do we need to send some hand rolled cubans to Rick to speed up the process?
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Apr 2007
Posts: 3,940 Likes: 1
Former Developer
|
Former Developer
Joined: Apr 2007
Posts: 3,940 Likes: 1 |
i'll donate a box, if he puts it in 7.5.2
|
|
|
|
Joined: Dec 2003
Posts: 6,628 Likes: 85
|
Joined: Dec 2003
Posts: 6,628 Likes: 85 |
A BOX!!!! I was thinking just a couple. Wow I didn't know it was that important. Heh Heh Heh.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
Rick can just go up to Canada to get some Cuban cigars any time he wants. Victoria is so beautiful.
|
|
|
|
Joined: Dec 2003
Posts: 1,796
Pooh-Bah
|
Pooh-Bah
Joined: Dec 2003
Posts: 1,796 |
Yes, I went there the one time I was in Seattle, the boat ride there was beautiful too - we must have seen 30-40 whales.
|
|
|
|
Joined: Dec 2003
Posts: 6,628 Likes: 85
|
Joined: Dec 2003
Posts: 6,628 Likes: 85 |
There be whales here. Quoted by Scotty from Star Trek.
One of these days I will make it out there. I would love to see those huge mammals.
Blue Man Group There is no such thing as stupid questions. Just stupid answers
|
|
|
|
Joined: Jun 2006
Posts: 16,365 Likes: 126
|
Joined: Jun 2006
Posts: 16,365 Likes: 126 |
I split this unsupported modification from the feature request that it was originally tacked on to; the original thread can be found here
Last edited by Gizmo; 03/01/2009 12:23 AM.
|
|
|
|
Joined: Mar 2008
Posts: 327
Enthusiast
|
Enthusiast
Joined: Mar 2008
Posts: 327 |
Clickity click for a fully-CPed version with more options/flexibility.
|
|
|
1 members (Ruben),
179
guests, and
54
robots. |
Key:
Admin,
Global Mod,
Mod
|
|
|
|