TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,963
  • Latest: BiZaJe
Stats
  • Total Posts: 195,910
  • Total Topics: 21,307
  • Online today: 872
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 381
  • Total: 381

security php

Started by Swampy, November 26, 2010, 11:03:39 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Swampy

As hard as I try I can't get the following to work. Perhaps someone could assist?

I am using SMF 2.0 RC4 with the latest TP downloaded from here.

security.php


Find

[Select]

// Require a user who is logged in. (not a guest.)
function is_not_guest($message = '')
{
global $user_info, $txt, $context;


========

Add After

[Select]

// Require a user who is logged in. (not a guest.)
function is_not_guest($message = '')
{
global $user_info, $txt, $context;

// TinyPortal
TPortal_init();

jncrenshaw

This is easy. I did the same yesterday. Haha.
Extract the zip file you have for the mod.
Inside you will have to edit two files.
The first is the tinyportal200rc3.mod file found in the SMF2RC3 folder.
Open that up inn Notebook and find the part that says:
// Require a user who is logged in. (not a guest.)
function is_not_guest($message = '')
{
global $user_info, $txt, $context;

Replace it with:
// Require a user who is logged in. (not a guest.)
function is_not_guest($message = '')
{
global $user_info, $txt, $context; $scripturl;

This will fix the problem you're concerned about.
However you need to make a second change as well.
Open the main package-info.xml file and find this:
   <install for="2.0 RC3">
<redirect url="">Installed!</redirect>
                <require-dir name="SMF2RC2/Themes" destination="$boarddir" />
                <require-dir name="common/Themes" destination="$boarddir" />
<require-dir name="SMF2RC2/Sources" destination="$boarddir" />
                <require-dir name="common/tp-downloads" destination="$boarddir" />
                <require-dir name="common/tp-images" destination="$boarddir" />
<require-dir name="SMF2RC2/tp-files" destination="$boarddir" />
                <readme type="inline">Installing TinyPortal v1.0 RC1 for SMF2.0 RC3</readme>
               <modification format="boardmod" type="file">SMF2RC3/tinyportal200rc3.mod</modification>
               <database>SMF2RC3/tp_upgrade.php</database>
        </install>
<uninstall for="2.0 RC3">
                <modification format="boardmod" type="file" reverse="true">SMF2RC3/tinyportal200rc3.mod</modification>
        </uninstall>

Replace it with this:
   <install for="2.0 RC3">
<redirect url="">Installed!</redirect>
                <require-dir name="SMF2RC2/Themes" destination="$boarddir" />
                <require-dir name="common/Themes" destination="$boarddir" />
<require-dir name="SMF2RC2/Sources" destination="$boarddir" />
                <require-dir name="common/tp-downloads" destination="$boarddir" />
                <require-dir name="common/tp-images" destination="$boarddir" />
<require-dir name="SMF2RC2/tp-files" destination="$boarddir" />
                <readme type="inline">Installing TinyPortal v1.0 RC1 for SMF2.0 RC3</readme>
               <modification format="boardmod" type="file">SMF2RC3/tinyportal200rc3.mod</modification>
               <database>SMF2RC3/tp_upgrade.php</database>
        </install>
<uninstall for="2.0 RC4">
                <modification format="boardmod" type="file" reverse="true">SMF2RC3/tinyportal200rc3.mod</modification>
        </uninstall>


You should now be able to install AND uninstall without a hitch. Good luck!
Hopefully you don't hit the same roadblock I'm at now. Haha.  :P

Update: You'll have to click "advanced" down below before installing and emulate the RC3 SMF before installing.
The latest version of TP isn't yet officially supported by SMF.
Good luck!

jncrenshaw

Oh. One more thing. You'll have to compress that as a zip again and re upload it.
If you still have problems you can take the full unzipped folder and ftp it into the packages directory.
Good luck!

Swampy

Thanks a lot!  Much appreicated!

Now I have t find an acrade that actually works.

Again thanks Much!!!

lurkalot


Swampy

tried the above modification and got the following error


execute Modification - SMF2RC3/tinyportal200rc3.mod - Modification parse error

I attached what I used with the modifications includled within.

This website is proudly hosted on Crocweb Cloud Website Hosting.