Jump to content
MakeWebGames

Recommended Posts

Posted

So when i add the code to the register.php

 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Parse error: syntax error, unexpected T_STRING, expecting '}' in register.php on line 212

Am i missing code or wrong spot?

Also is there a way to actually make the forum integrated into the game itself kinda like the forum.php was?

Thanks again!

Posted

Could you post lines 200 - 220 from register.php, and I'll assist you?

Also is there a way to actually make the forum integrated into the game itself kinda like the forum.php was?

Yes, if you use SSI.

Posted (edited)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Parse error: syntax error, unexpected T_STRING, expecting '}' in register.php on line 213

How would i go about using SSl?

Thanks

Edited by CENilsen
Posted (edited)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Parse error: syntax error, unexpected T_STRING, expecting '}' in register.php on line 213

How would i go about using SSl?

Thanks

Ah, my bad. Those lines don't give me enough to work with, I though it may include all the if() statements. Can you please post your entire register page (If you're uncomfortable with that, PM me it.)

A link to SMF SSI: http://www.simplemachines.org/community/index.php?topic=173483.0

Edit #1

Better text regarding the SSI

Edited by sniko
Posted

Try change:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

With

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Notice I removed the spaces in the word "email".

Posted

you know, this is funny. I just started thinking of this thread like a week ago and thought what can we do to make this better and though:

"Why not standardize this a little bit?"

So here is a small start that you can add into globals.php and nonauth.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

then on reg you can do something like:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

**note**

if there are any spaces in the word email (or anywhere else in that matter, please remove them ;) Gracias!)

This isn't much but it helps cut down some lines of code, and makes easy integration of the forum elsewhere for example:

  • you have an announcement mod with forum integration.
  • or you just want to throw random crap in a topic

Now I don't know much about smf's ssi but maybe it provides better usage?

Posted
you know, this is funny. I just started thinking of this thread like a week ago and thought what can we do to make this better and though:

"Why not standardize this a little bit?"

So here is a small start that you can add into globals.php and nonauth.php

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

then on reg you can do something like:

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

**note**

if there are any spaces in the word email (or anywhere else in that matter, please remove them ;) Gracias!)

This isn't much but it helps cut down some lines of code, and makes easy integration of the forum elsewhere for example:

  • you have an announcement mod with forum integration.
  • or you just want to throw random crap in a topic

Now I don't know much about smf's ssi but maybe it provides better usage?

Great addition, Kyle!

I'll add a permalink on OP to this.

Now I don't know much about smf's ssi but maybe it provides better usage?

Yes. :)

Posted

You can thank my constant trial and error of all these mods it always seems like theirs a extra space somewhere or a line that doesn't need to be needed.....But yea ill try to see if i can get the ssi to work and hopefully i can post a finish product of what i use.

Posted
You can thank my constant trial and error of all these mods it always seems like theirs a extra space somewhere or a line that doesn't need to be needed.....But yea ill try to see if i can get the ssi to work and hopefully i can post a finish product of what i use.

That's great! I can't wait to see what you come up with :)

  • 4 weeks later...
Posted
Sorry to update such an old thread, however, here's an addon to update the amount of players, and the latest members name (displayed in the statistics center, and info center)

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

Then just call those functions as soon as someone signs up;

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

 

:)

Where do I put this? In its own file?

Posted
Where do I put this? In its own file?

Functions anywhere that can be called, then call those 2 functions on the register page I think.

  • 1 year later...
Posted

Managed to get the first part working, just having trouble with the register page 

You're unable to view this code.

Viewing code within this forum requires registration, you can register here for free.

Gives me this error

Fatal error: Uncaught Error: Call to undefined function mysql_connect() in C:\xampp\htdocs\register.php:177 Stack trace: #0 {main} thrown in C:\xampp\htdocs\register.php on line 177

Some help would be much appreciated!

Posted

This topic was originally created in 2012. SMF has been updated countless times since - as has PHP.
In PHP7.4.8 (what you're using), mysql_*() functions have been completely removed.

Long story short, this snippet will no longer work

Posted
3 minutes ago, Magictallguy said:

This topic was originally created in 2012. SMF has been updated countless times since - as has PHP.
In PHP7.4.8 (what you're using), mysql_*() functions have been completely removed.

Long story short, this snippet will no longer work

Ah ok, thanks for clearing that up 

Posted
14 hours ago, Magictallguy said:

This topic was originally created in 2012. SMF has been updated countless times since - as has PHP.
In PHP7.4.8 (what you're using), mysql_*() functions have been completely removed.

Long story short, this snippet will no longer work

The post date should not matter since this engine is still supported. What year was MCCode released.

Posted
1 hour ago, Sim said:

The post date should not matter since this engine is still supported. What year was MCCode released.

MCCv2 is still supported, yes. This implementation, however, was written in v1 style with hardcoded calls to mysql_*() functions.
I'm aware that @PHPStudent is running on PHP7.4.8 (support request).
It's not the engines at fault, but the date of the snippets release - it's too old (as-is) to run on PHPStudent's system.

  • Dave locked this topic
Guest
This topic is now closed to further replies.
×
×
  • Create New...