TinyPortal

Started by lurkalot, February 12, 2005, 04:43:00 AM

Previous topic - Next topic

DarkAngel612

got it and answered -- twice cause i forgot to tell you something about that site in particular
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

IchBin™

#1081
Please make a backup before you do these changes. This should fix the block access problem.

In Sources/TPortal.php find this code on about line #1638
if($context['user']['is_logged'])
$mygroups[] = 0;


Comment it out like this:
//if($context['user']['is_logged'])
//$mygroups[] = 0;


Then find this line right below the above code:
$access = '(FIND_IN_SET(' . implode(', access) OR FIND_IN_SET(', $mygroups) . ', access))';

Add after that line this:

    if(allowedTo('tp_blocks') && (!empty($context['TPortal']['admin_showblocks']) || !isset($context['TPortal']['admin_showblocks'])))
$access = '1';


-----EDIT-----

Find about line #1937:
if(!$context['user']['is_logged'])
      $mygroups[] = 0;


Comment it out like this:
//if(!$context['user']['is_logged'])
    //  $mygroups[] = 0;


If that doesn't fix it, revert to the backup and let me know what the problem is.
IchBin™        TinyPortal

An0nymousHelper

Ok thanks ill give that a try!

DarkAngel612

I tried it...got no error message at all but looking in a different browser---not logged in i could still see the block that i had set to no guest viewing.
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

An0nymousHelper

#1084
Hmm i tried it and got this error when i tried to go to the site...




IchBin™

An0nymousHelper,

You've either removed the file or it has become corrupted. Index.php is trying to load the TPortal.php file that you just edited but cannot find it. Replace the file and try the edits again.

I have updated the above post with one more edit that needs to be done. That should fix it as I tested it myself.
IchBin™        TinyPortal

An0nymousHelper

ok Thanks very much it's all working great now :)

DarkAngel612

thanks this worked beautifully
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

j_jindal1

Need some suggestions..

I had a fresh install of SMF 1.1.13 and TinyPortal10RC1, Everything messed up as shown in the pic below..



When I checked from admin panel I didn't find many of Menu items in TP.


Please suggest what might be wrong here.... I tried to install it on SMF 1.1.12 as well but results were same....
www.ShayarFamily.com Shayri forum of Friends

DarkAngel612

i would suggest you open the zip and then upload all the fiels all over again...to the server to make sure you got them all uploaded to begin with...being a fresh install you should not have any mods installed, right?
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

j_jindal1

Yes it is a fresh install. Surprisingly even with TP1.05 I'm getting the same issue. I guess it has to do something with the server because I was getting errors like..

Database Error: MySQL server has gone away
File: *************/Sources/Subs-Package.php
Line: 2025

Please suggest a direct way to install the script.
www.ShayarFamily.com Shayri forum of Friends

IchBin™

Put these language files in your Themes/default/languages folder.
IchBin™        TinyPortal

j_jindal1

I just uploaded the files as you suggested, but still the same..

I'm uploading all the files manually and trying to install TP using install script. I'll be back with the update..
www.ShayarFamily.com Shayri forum of Friends

IchBin™

The missing text is from missing language strings, that's why I gave you utf8 English files. What language are you using? English? English-utf8? Another langauge?
IchBin™        TinyPortal

j_jindal1

I'm using English-UTF8
www.ShayarFamily.com Shayri forum of Friends

IchBin™

And you're still not getting any text showing up for the TP admin? If not, you should be seeing a bunch of errors in your error log. The files I posted should work, they just worked for me on a UTF8 installation.
IchBin™        TinyPortal

bigjoe11a

After updating from SMF 1.1.12 to 1.1.13 I see that in the TP Settings for downloads. doesn't seem to want to display right.

This is for the text header for the TP downloads section.
When I save it, This is what happens

<p>Downloads: <br></p><p><br></p>

This is what the users sees. any one have an idea on how to fix this. I wasn't doing this before the SMF update. It seems to add some html tags and it shouldn't...



SMF Forums http://www.df-barracks.com Where gamers go.

DarkAngel612

here are a couple of fixes that we all needed...one for the html peeking out:

Sources/TPortalAdmin.php

Find this line:(about line #337)

global $context,$txt,$settings,$boardurl,$scripturl,$boarddir,$user_info,$db_prefix;

Change to:

global $context,$txt,$settings,$boardurl,$scripturl,$boarddir,$user_info,$db_prefix, $modSettings;


Find this line:(about line #469)

Code:
$context['TPortal']['blockedit']['body'] = html_entity_decode($row['body'], ENT_NOQUOTES);

Change to:

$context['TPortal']['blockedit']['body'] = html_entity_decode($row['body'], ENT_NOQUOTES, $modSettings['global_character_set']);



and then some of us had the \' when using the apostrophe throughout the forum and shoutbox...lol

In Sources/TPdlmanager.php on about line #2068 look for this line:

Find:
            tp_query("UPDATE " . $tp_prefix . "dlmanager SET description = '" . mysql_real_escape_string($value) . "' WHERE id=". $id, __FILE__, __LINE__);


Replace it with:
            tp_query("UPDATE " . $tp_prefix . "dlmanager SET description = '" . mysql_real_escape_string(stripslashes($value)) . "' WHERE id=". $id, __FILE__, __LINE__);





In tp-files/tp-modules/TPShout/Sources/TPShout.phpFind:
      while($row = tpdb_fetch_assoc($request))
      {

                        $row['avatar'] = $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="&nbsp;"  />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="&nbsp;" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="&nbsp;" />');
         $ns[] = template_singleshout($row);
      }


Replace with this:

      while($row = tpdb_fetch_assoc($request))
      {
            $row['value1'] = stripslashes($row['value1']);
         $row['avatar'] = $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="&nbsp;"  />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '" alt="&nbsp;" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="&nbsp;" />');
         $ns[] = template_singleshout($row);
      }

I keep a copy of fixes that IchBin and others have given me in the past for if I ever need to reup a file and lose the fix.
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

bigjoe11a

Thanks. It's just that it didn't work. I uploaded the file to replace the old one. I log in and changed the downloads text header and I still have the same problem.

This below is how the text header for the downloads looks
<p>Downloads :</p><p>You can find just about any download here from Novalogic games. If you can't find what your looking for, Then all you have to do is ask.</p><p><br></p>

It's just not doing any thing about the html tags.
SMF Forums http://www.df-barracks.com Where gamers go.

DarkAngel612

if you did both edits to that file then uploaded and overwrote the one on the server then...it should work...Try typing it again--delete the wording...save then rewrite it to see if it behaves...that is the instructions we were given and it worked for us
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

Advertisement: