Simple Machines Community Forum

Customizing SMF => Tips and Tricks => Topic started by: SwapsRulez on June 20, 2008, 11:30:04 AM

Title: Let Your Guest Register...!!!
Post by: SwapsRulez on June 20, 2008, 11:30:04 AM
Let Your Guest Register...!!!

The simple trick does hide the link. Whenever guests try to click on the link, they get the Alert that you need to login or register to see the link. Then the page forwarded to the registration page. ;)

Thanks Eliana Tamerin For that quick correction.  O:)

You just need to put the follwing code in your subs.php file. I've tested this MOD on SMF 1.5 & 2.0 Beta 3.1
However you can let it work with little modifications for other versions.

For SMF 2.x

Open Subs.php


Find
'content' => '<a href="$1" class="bbc_link">$1</a>',

Replace With
'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" class="bbc_link">$1</a>',


Find
'before' => '<a href="$1" class="bbc_link">',

Replace With
'before' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">' : '<a href="$1" class="bbc_link">',

Find
'content' => '<a href="$1" class="bbc_link">$1</a>',

Replace With
'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" class="bbc_link">$1</a>',

Find
'before' => '<a href="$1" class="bbc_link">',

Replace With
'before' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">' : '<a href="$1" class="bbc_link">',


For SMF 1.x

Open Subs.php


Find
'content' => '<a href="$1" target="_blank">$1</a>',

Replace With
'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register"  onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" target="_blank">$1</a>',


Find
'before' => '<a href="$1" target="_blank">',

Replace With
'before' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" onclick="alert(\'You need to login or register to see the link. Thank you.\')">' : '<a href="$1" target="_blank">',

Find
'content' => '<a href="$1" target="_blank">$1</a>',

Replace With
'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" target="_blank">$1</a>',

Find
'before' => '<a href="$1" target="_blank">',

Replace With
'before' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" onclick="alert(\'You need to login or register to see the link. Thank you.\')">' : '<a href="$1" target="_blank">',



Demo is here,

http://www.project-bb.org/programming-tutorials/c-programming-tutorials-t2642/

Try to click on any link there, you'll get a javascript alert & forwarded to registration page. :)

Title: Re: Let Your Guest Register...!!!
Post by: Eliana Tamerin on June 20, 2008, 01:08:09 PM
Why don't you just use <a href="', $scripturl, '?action=register">Blah</a>?
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on June 20, 2008, 01:11:11 PM
Quote from: Eliana Tamerin on June 20, 2008, 01:08:09 PM
Why don't you just use <a href="', $scripturl, '?action=register">Blah</a>?

Ohhh i have completely forgotten that ;)
Thanks for letting me know that. I'm editing main post to help others. :)
Title: Re: Let Your Guest Register...!!!
Post by: Eliana Tamerin on June 20, 2008, 01:16:12 PM
Yeah, useful little variable. ;)
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on June 21, 2008, 03:33:43 PM
Quote from: Eliana Tamerin on June 20, 2008, 01:16:12 PM
Yeah, useful little variable. ;)

Where can i get the complete list of such variables lol ?
Title: Re: Let Your Guest Register...!!!
Post by: Eliana Tamerin on June 21, 2008, 03:58:37 PM
Well, you can look in Load.php. There's also some variables for theming, like $scripturl, $themedir (which points to /Themes/default), $languagedir (which points to /Themes/default/languages) and $settings['images_url'] (which points to /Themes/default/images) and so on.
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on June 21, 2008, 09:43:34 PM
Quote from: Eliana Tamerin on June 21, 2008, 03:58:37 PM
Well, you can look in Load.php. There's also some variables for theming, like $scripturl, $themedir (which points to /Themes/default), $languagedir (which points to /Themes/default/languages) and $settings['images_url'] (which points to /Themes/default/images) and so on.

Ohh... Thanks. Any chance of getting it moved to tips & tricks. :)
Title: Re: Let Your Guest Register...!!!
Post by: brianjw on July 02, 2008, 07:18:20 PM
I am not familiar with javascript, but I am wondering if it's possible to show a little alert menu that (instead of having an OK button) has a LOGIN button that takes them to ?action=login and then a REGISTER button that takes them to ?action=register.

It might be complex or not possible. This way, instead of directing them to the registration page when they might be already a member, it creates a better way and more userfriendly and less forcing lol.

Thanks,
brianjw
Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on July 04, 2008, 05:18:31 AM
Hi @SwapsRulez

Thanks for this tip. But it didn't work on your demo link..
I'm still having that pop-up warn even I'm a member of your site.

Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 04, 2008, 06:47:45 AM
Quote from: brianjw on July 02, 2008, 07:18:20 PM
I am not familiar with javascript, but I am wondering if it's possible to show a little alert menu that (instead of having an OK button) has a LOGIN button that takes them to ?action=login and then a REGISTER button that takes them to ?action=register.

It might be complex or not possible. This way, instead of directing them to the registration page when they might be already a member, it creates a better way and more userfriendly and less forcing lol.

Thanks,
brianjw

Actually the OK button doesn't redirects to the registration page. But the <a href> does that there. Actually its just a trick that first the Message box shows up & then it goes to the registration page after completing javascript part. :D

Quote from: Hoochie Coochie Man on July 04, 2008, 05:18:31 AM
Hi @SwapsRulez

Thanks for this tip. But it didn't work on your demo link..
I'm still having that pop-up warn even I'm a member of your site.


Yes, i've seen that you registered there. I have tried by creating a normal account. Dont try with IE, currently it does have some problem there. Try out with Firefox or Opera... :D
Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on July 04, 2008, 06:50:35 AM
Quote from: SwapsRulez on July 04, 2008, 06:47:45 AM
Quote from: Hoochie Coochie Man on July 04, 2008, 05:18:31 AM
Hi @SwapsRulez

Thanks for this tip. But it didn't work on your demo link..
I'm still having that pop-up warn even I'm a member of your site.


Yes, i've seen that you registered there. I have tried by creating a normal account. Dont try with IE, currently it does have some problem there. Try out with Firefox or Opera... :D

Actually, I've already tried it with Firefox, not IE :)

Edit: Opps wait..!!
it worked..

Did you do something on last one hour? :D
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 04, 2008, 06:53:57 AM
Nope actually. Cookies problem might be ;)
Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on July 04, 2008, 06:54:47 AM
Quote from: SwapsRulez on July 04, 2008, 06:53:57 AM
Nope actually. Cookies problem might be ;)
Yeah, that's right ;)

So.. Can you fix IE problem?
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 04, 2008, 07:13:37 AM
Quote from: Hoochie Coochie Man on July 04, 2008, 06:54:47 AM
Quote from: SwapsRulez on July 04, 2008, 06:53:57 AM
Nope actually. Cookies problem might be ;)
Yeah, that's right ;)

So.. Can you fix IE problem?

Nope. May be i need to ask someone here. What error message are you getting in IE ?
I'm getting this.

(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fi28.tinypic.com%2F149wmmq.jpg&hash=ba7a176fd3176cec4f1913902731a4eeb9806c74)

May be someone can help us. Thanks for taking interest..

Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on July 04, 2008, 07:19:30 AM
Yep, same error..
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 04, 2008, 07:48:27 AM
Quote from: Hoochie Coochie Man on July 04, 2008, 07:19:30 AM
Yep, same error..

On my site, or your site tooo :-\
Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on July 04, 2008, 08:05:07 AM
On your site.
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 04, 2008, 02:05:23 PM
Quote from: Hoochie Coochie Man on July 04, 2008, 08:05:07 AM
On your site.

Yeah, that's bad. I dont know what's the problem there. I'm making a topic in 2.x support forum. Hope i'll get a reply. But i think its not related with this trick. So users can install it freely. :)
Title: Re: Let Your Guest Register...!!!
Post by: Sarge on July 05, 2008, 06:50:09 AM
It works fine from my computer (IE 7 and Windows XP)...

Is it happening on Vista?
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 05, 2008, 08:46:44 AM
Thanks for taking interest in the problem Sarge. Yes, i'm using Windows Vista. But my few friends using XP also got the same error message. I've posted my question in the 2.x Support forum here

http://www.simplemachines.org/community/index.php?topic=247845.0

& Its solved by the metallica48423. Everything is OK now. Its caused by the lightbox MOD.
It means that lightbox MOD does have the problem with the Internet Explorer. Though not sure about the XP or Vista.

Btw, Its not related with this trick. :) It was my problem. Sorry for messing up in the topic. :P

Thanks to metallica48423, Sarge & Hoochie Coochie Man who took interest in my problem. :)
Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on July 05, 2008, 08:58:06 AM
So.. There is no error in this tip. Thanks..
Title: Re: Let Your Guest Register...!!!
Post by: Sarge on July 05, 2008, 09:18:24 AM
I'm glad your problem is now solved. :)
Title: Re: Let Your Guest Register...!!!
Post by: tatore on July 05, 2008, 09:31:44 AM
There's something nice to read about the js that usually create issues with IE.
Mainly the trick is either uninstall the lightboxes (as you did) :P , or find a way to play around the

window.addEvent('domready', Lightbox.init.bind(Lightbox)); (http://clientside.cnet.com/code-snippets/manipulating-the-dom/ie-and-operation-aborted/)

'Googling' with the code above it will be easy to find a way to use motools.js or slimbox.js without conflicts.
Title: Re: Let Your Guest Register...!!!
Post by: Sarge on July 05, 2008, 09:47:19 AM
There's a Integrate Lightbox 1.6 (http://custom.simplemachines.org/mods/index.php?mod=1158) mod by quake101 (not the mod by karlbenson) that actually uses Slimbox (created with the mootools library).

The original mod (version 1.4) by karlbenson uses Lightbox2; quake101 took over the mod and updated it to use Slimbox.
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 06, 2008, 12:11:50 AM
Quote from: Sarge on July 05, 2008, 09:47:19 AM
There's a Integrate Lightbox 1.6 (http://custom.simplemachines.org/mods/index.php?mod=1158) mod by quake101 (not the mod by karlbenson) that actually uses Slimbox (created with the mootools library).

The original mod (version 1.4) by karlbenson uses Lightbox2; quake101 took over the mod and updated it to use Slimbox.

So what should i use to simulate that ? Slimbox or lightbox ? I cant find the slimbox mod anywhere in the forum. I know lightbox uses slimbox, but any chances to fix that error ?

@tatore, nice find. But i'm lost there in that webpage. :P Still i'll try out that...  Thanks for that link. :D
Title: Re: Let Your Guest Register...!!!
Post by: Sarge on July 06, 2008, 02:09:05 AM
Quote from: SwapsRulez on July 06, 2008, 12:11:50 AM
So what should i use to simulate that ? Slimbox or lightbox ? I cant find the slimbox mod anywhere in the forum. I know lightbox uses slimbox, but any chances to fix that error ?

Let me clarify: Slimbox is an alternative to Lightbox. I personally prefer Slimbox -- it achieves the same effect, uses less code and can be used as soon as the page opens in the browser, without the need to wait for all images to load. For more information about Slimbox, go to: http://www.digitalia.be/software/slimbox

The Integrate Lightbox 1.6 mod uses Slimbox. You can read the description and download the mod here:
http://custom.simplemachines.org/mods/index.php?mod=1158
Title: Re: Let Your Guest Register...!!!
Post by: nowakfilip on July 09, 2008, 10:48:20 PM
Is there any chance to make it work on version 1.1.5.

I would really appreciate that, thank you.
Title: Re: Let Your Guest Register...!!!
Post by: sohaib on July 15, 2008, 07:13:47 AM
Were can we post this
<a href="', $scripturl, '?action=register">Blah</a>?
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 15, 2008, 11:07:17 AM
Quote from: sohaib on July 15, 2008, 07:13:47 AM
Were can we post this
<a href="', $scripturl, '?action=register">Blah</a>?

You don't have to post that. After applying the modification, the guests will automatically get the registration page link instead of original link. You just have to do the modification in the subs.php as mentioned in the first post.

Quote from: nowakfilip on July 09, 2008, 10:48:20 PM
Is there any chance to make it work on version 1.1.5.

I would really appreciate that, thank you.

Can you please attach subs.php file here, so that i can look out for the modifications to be made in the subs.php for SMF 1.5.
Thanks.
Title: Re: Let Your Guest Register...!!!
Post by: nowakfilip on July 15, 2008, 12:17:23 PM
Sure, here is my subs.php file.

http://rapidshare.com/files/129915850/Subs.php.html

*I couldn't find an upload form here and I couldn't post the fie here, because it exceeded the maximum length.

Also is there a way site links cold be shown as text.

For example:

"http://simplemachines.org/" would show as "You need to register to be able to see the link" and when guests would click on it they would get forwarded to registration page.

But when members would login they would see the original site link "http://simplemachines.org".

I would really appreciate any help.
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on July 20, 2008, 02:58:20 PM
Hey nowakfilip, i checked your subs.php

There should not be any problem with it installing the trick. It will work perfectly with SMF 1.5 also.

Also about your problem, you'll need to use just plain javascript without an <a href> tag for making it plain. Also you'll have to use the onclick event to forward the user the registration page.

This will help you ---->          onClick="parent.location='index.php?action=register'"

Also one more useful link to check out which tags supports onclick.

http://www.w3schools.com/jsref/jsref_onclick.asp
Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on August 11, 2008, 05:46:01 AM
Hi @SwapsRulez

What is that "bbc_link" thing?  :-\
There is no such a thing in subs.php

'content' => '<a href="$1" class="bbc_link">$1</a>',

'before' => '<a href="$1" class="bbc_link">',

Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on August 11, 2008, 02:50:12 PM
@Hoochie Coochie Man,

I'm using SMF 2.0 Beta 3.1. You ?
Its there in 2.x

Don't know about 1.x :P
Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on August 11, 2008, 03:18:40 PM
But you told that you've tested this MOD on SMF 1.5 :P
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on August 12, 2008, 12:03:45 AM
Quote from: Hoochie Coochie Man on August 11, 2008, 03:18:40 PM
But you told that you've tested this MOD on SMF 1.5 :P

Oops, Sorry! We have to use logics there. Not all people are able to understand that. Thanks mate for bringing that thing up. I'm making that changes in the main post.

Thanks again. :)
Title: Re: Let Your Guest Register...!!!
Post by: Hoochie Coochie Man on August 12, 2008, 02:01:15 AM
Ok, you're welcome :)
Title: Re: Let Your Guest Register...!!!
Post by: riker on August 18, 2008, 09:03:21 AM
Quote from: SwapsRulez on June 20, 2008, 11:30:04 AM

You just need to put the follwing code in your subs.php file. I've tested this MOD on SMF 1.5 & 2.0 Beta 3.1
However you can let it work with little modifications for other versions.

For SMF 2.x

Open Subs.php


Find
'content' => '<a href="$1" class="bbc_link">$1</a>',

Replace With
'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" class="bbc_link">$1</a>',


Find
'before' => '<a href="$1" class="bbc_link">',

Replace With
'before' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">' : '<a href="$1" class="bbc_link">',

Find
'content' => '<a href="$1" class="bbc_link">$1</a>',

Replace With
'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" class="bbc_link">$1</a>',

Find
'before' => '<a href="$1" class="bbc_link">',

Replace With
'before' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">' : '<a href="$1" class="bbc_link">',

I get to this,

'before' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">' : '<a href="$1" class="bbc_link">',

And it's not in the subs.  I've also downloaded the Large upgrade again and tried it on that subs.php just to be sure and it doesn't work on that either!
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on August 20, 2008, 12:58:12 PM
@riker : You need to find this

'before' => '<a href="$1" class="bbc_link">',

:)

Title: Re: Let Your Guest Register...!!!
Post by: LOADING... on August 25, 2008, 11:09:28 AM
Thanks for the code
Title: Re: Let Your Guest Register...!!!
Post by: SaNoerdo on August 27, 2008, 04:10:22 PM
The code is not working for me. Using SMF 1.1.5.
I'm getting the error: Parse error: syntax error, unexpected ',' in /home/reisforum.net/Sources/Subs.php on line 1230

Just did what you described. Find the text, replace it with the new code. I really like to get this working :)
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on September 01, 2008, 01:13:52 PM
Quote from: SaNoerdo on August 27, 2008, 04:10:22 PM
The code is not working for me. Using SMF 1.1.5.
I'm getting the error: Parse error: syntax error, unexpected ',' in /home/reisforum.net/Sources/Subs.php on line 1230

Just did what you described. Find the text, replace it with the new code. I really like to get this working :)

You might have added some extra characters. Post those lines here from subs.php :)
Title: Re: Let Your Guest Register...!!!
Post by: MzLgNy on September 02, 2008, 12:02:43 PM
Okay.. it's over... :)
Title: Re: Let Your Guest Register...!!!
Post by: evanora on September 08, 2008, 07:47:35 PM
Quote from: SwapsRulez on September 01, 2008, 01:13:52 PM
Quote from: SaNoerdo on August 27, 2008, 04:10:22 PM
The code is not working for me. Using SMF 1.1.5.
I'm getting the error: Parse error: syntax error, unexpected ',' in /home/reisforum.net/Sources/Subs.php on line 1230

Just did what you described. Find the text, replace it with the new code. I really like to get this working :)

You might have added some extra characters. Post those lines here from subs.php :)

SwapsRulez,

I'm sorry to bother you but I have exactly the same problem. Here's the line of code:

'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register"  onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" target="_blank">$1</a>',

Help plz. Thanks.
Title: Re: Let Your Guest Register...!!!
Post by: evanora on September 08, 2008, 08:40:15 PM
Quote from: evanora on September 08, 2008, 07:47:35 PM
Quote from: SwapsRulez on September 01, 2008, 01:13:52 PM
Quote from: SaNoerdo on August 27, 2008, 04:10:22 PM
The code is not working for me. Using SMF 1.1.5.
I'm getting the error: Parse error: syntax error, unexpected ',' in /home/reisforum.net/Sources/Subs.php on line 1230

Just did what you described. Find the text, replace it with the new code. I really like to get this working :)

You might have added some extra characters. Post those lines here from subs.php :)

SwapsRulez,

I'm sorry to bother you but I have exactly the same problem. Here's the line of code:

'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register"  onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" target="_blank">$1</a>',

Help plz. Thanks.

I'm still waiting for SwapsRulez but meanwhile, if any other person can help, I'd much appreciate it.
Title: Re: Let Your Guest Register...!!!
Post by: Adish - (F.L.A.M.E.R) on September 09, 2008, 03:41:27 PM
That site is a great resource site for tutorials.. would have it in my links heaven or do some copy paste for my website ;)
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on September 13, 2008, 08:39:30 AM
Quote from: evanora on September 08, 2008, 08:40:15 PM
Quote from: evanora on September 08, 2008, 07:47:35 PM
Quote from: SwapsRulez on September 01, 2008, 01:13:52 PM
Quote from: SaNoerdo on August 27, 2008, 04:10:22 PM
The code is not working for me. Using SMF 1.1.5.
I'm getting the error: Parse error: syntax error, unexpected ',' in /home/reisforum.net/Sources/Subs.php on line 1230

Just did what you described. Find the text, replace it with the new code. I really like to get this working :)

You might have added some extra characters. Post those lines here from subs.php :)

SwapsRulez,

I'm sorry to bother you but I have exactly the same problem. Here's the line of code:

'content' => $user_info['is_guest'] ? '<a href="', $scripturl, '?action=register"  onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" target="_blank">$1</a>',

Help plz. Thanks.

I'm still waiting for SwapsRulez but meanwhile, if any other person can help, I'd much appreciate it.

Try out like this.

'content' => $user_info['is_guest'] ? '<a href="http://www.project-bb.org/index.php?action=register" class="bbc_link new_win" onclick="alert(\'You need to login or register to see the link. Thank you.\')">$1</a>' : '<a href="$1" class="bbc_link">$1</a>',


Replace my site name with yours. :D Also remove those class things accordingly if your version don't have it. Check if it works. :D
Title: Re: Let Your Guest Register...!!!
Post by: Oldiesmann on October 19, 2008, 01:01:27 AM
Do you still need help with this evanora?
Title: Re: Let Your Guest Register...!!!
Post by: xmusic on November 17, 2008, 01:21:54 PM
does the code work for smf 1.1.7
Title: Re: Let Your Guest Register...!!!
Post by: LOADING... on November 17, 2008, 05:17:31 PM
Sure i also want to know if this works on 117
Title: Re: Let Your Guest Register...!!! (error with 2.0 pb 4)
Post by: pwidget on November 19, 2008, 11:15:29 AM
Hello,
I can only find 2 lines to be edited

'content' => '<a href="$1" class="bbc_link">$1</a>',

and

'before' => '<a href="$1" class="bbc_link">',

When edited with change provide I get...

Parse error: syntax error, unexpected ',' in /home/content/t/a/y/tayhome/html/piop/forum/Sources/Subs.php on line 1264

and

Parse error: syntax error, unexpected ',' in /home/content/t/a/y/tayhome/html/piop/forum/Sources/Subs.php on line 1272

What seems to be wrong?
Title: Re: Let Your Guest Register...!!!
Post by: pwidget on November 19, 2008, 12:33:01 PM
Ok,

This is how the scripturl link should look
' . $scripturl . '

NOT
', $scripturl, '

Plus in SMF 2.0 pb 4

Just do a search for

'tag' => 'iurl', (opens link in same window)
'tag' => 'url', (opens link in NEW window)

To find the lines you need to change. Plus you could also add to the
'tag' => 'email',

To stop guest from emailing members that put their email in a post.

Cheers...


Title: Re: Let Your Guest Register...!!!
Post by: Meredith Horn Jr on December 01, 2008, 02:33:30 PM
ok I'm trying to look at getting on my site to, but this is all new to me so what do I need to do to put it on my site?
Title: Re: Let Your Guest Register...!!!
Post by: Oldiesmann on February 02, 2009, 10:05:27 PM
Do you still need help with this Meredith?
Title: Re: Let Your Guest Register...!!!
Post by: SwapsRulez on February 03, 2009, 09:39:39 PM
Quote from: Meredith Horn Jr on December 01, 2008, 02:33:30 PM
ok I'm trying to look at getting on my site to, but this is all new to me so what do I need to do to put it on my site?

Follow the instructions above. You probably need to first backup the files which you are editing. After that edit the files on your site by downloading, editing and then uploading or other way using online file manager to edit the files. After editing the files, check if your link is shown to guests and after clicking what happens.

Best luck!
Title: Re: Let Your Guest Register...!!!
Post by: DELHI_BOY on June 18, 2009, 05:24:14 AM
where is the file subs.php ?
Title: Re: Let Your Guest Register...!!!
Post by: Arantor on June 18, 2009, 07:31:46 AM
Subs.php is in the Sources directory. Before modifying it make sure you take a backup.
Title: Re: Let Your Guest Register...!!!
Post by: taimurkazmi on June 20, 2009, 01:42:59 AM
Thanks for sharing
Title: Re: Let Your Guest Register...!!!
Post by: secretboy7 on February 14, 2010, 10:57:25 AM
it doesn't work with 1.1.11
Title: Re: Let Your Guest Register...!!!
Post by: secretboy7 on February 14, 2010, 11:29:45 AM
Quote from: Eliana Tamerin on June 20, 2008, 01:08:09 PM
Why don't you just use <a href="', $scripturl, '?action=register">Blah</a>?


where should we put this code????????????????
Title: Re: Let Your Guest Register...!!!
Post by: yurckk on February 15, 2010, 04:22:57 PM
Edit the Subs.php in the core theme or theme i'm using now? Some of files I can't find inside the theme I'm using right now.

Edit: Sorry, I missed Arantor's post. Ok I found this, thanks.

QuoteSubs.php is in the Sources directory. Before modifying it make sure you take a backup.