Jump to content
MakeWebGames

How to integrate SMF into any McCodes Package


sniko

Recommended Posts

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!

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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. :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

  • 4 weeks later...
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?

Link to comment
Share on other sites

  • 1 year later...

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!

Link to comment
Share on other sites

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 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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