Advertisement:

Author Topic: TinyPortal  (Read 762762 times)

Offline DarkAngel612

  • Sophist Member
  • *****
  • Posts: 1,044
  • Gender: Female
Re: TinyPortal
« Reply #1080 on: February 11, 2011, 12:03:32 AM »
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

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
Re: TinyPortal
« Reply #1081 on: February 11, 2011, 12:17:19 AM »
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
Code: [Select]
if($context['user']['is_logged'])
$mygroups[] = 0;

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

Then find this line right below the above code:
Code: [Select]
$access = '(FIND_IN_SET(' . implode(', access) OR FIND_IN_SET(', $mygroups) . ', access))';
Add after that line this:
Code: [Select]
    if(allowedTo('tp_blocks') && (!empty($context['TPortal']['admin_showblocks']) || !isset($context['TPortal']['admin_showblocks'])))
$access = '1';

-----EDIT-----

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

Comment it out like this:
Code: [Select]
//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.
« Last Edit: February 11, 2011, 10:47:27 AM by IchBin™ »
IchBin™        TinyPortal
Coding Guidelines       

Offline An0nymousHelper

  • Jr. Member
  • **
  • Posts: 106
Re: TinyPortal
« Reply #1082 on: February 11, 2011, 12:36:25 AM »
Ok thanks ill give that a try!

Offline DarkAngel612

  • Sophist Member
  • *****
  • Posts: 1,044
  • Gender: Female
Re: TinyPortal
« Reply #1083 on: February 11, 2011, 12:52:03 AM »
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

Offline An0nymousHelper

  • Jr. Member
  • **
  • Posts: 106
Re: TinyPortal
« Reply #1084 on: February 11, 2011, 12:57:39 AM »
Hmm i tried it and got this error when i tried to go to the site...



« Last Edit: February 11, 2011, 01:17:31 AM by An0nymousHelper »

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
Re: TinyPortal
« Reply #1085 on: February 11, 2011, 10:48:32 AM »
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
Coding Guidelines       

Offline An0nymousHelper

  • Jr. Member
  • **
  • Posts: 106
Re: TinyPortal
« Reply #1086 on: February 11, 2011, 06:41:27 PM »
ok Thanks very much it's all working great now :)

Offline DarkAngel612

  • Sophist Member
  • *****
  • Posts: 1,044
  • Gender: Female
Re: TinyPortal
« Reply #1087 on: February 12, 2011, 04:27:31 PM »
thanks this worked beautifully
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.0+ with various mods and TinyPortal

Offline j_jindal1

  • Semi-Newbie
  • *
  • Posts: 97
    • Shayri forum of Friends
Re: TinyPortal
« Reply #1088 on: February 12, 2011, 08:00:14 PM »
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

Offline DarkAngel612

  • Sophist Member
  • *****
  • Posts: 1,044
  • Gender: Female
Re: TinyPortal
« Reply #1089 on: February 12, 2011, 08:07:25 PM »
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

Offline j_jindal1

  • Semi-Newbie
  • *
  • Posts: 97
    • Shayri forum of Friends
Re: TinyPortal
« Reply #1090 on: February 12, 2011, 08:12:02 PM »
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

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
Re: TinyPortal
« Reply #1091 on: February 12, 2011, 08:16:50 PM »
Put these language files in your Themes/default/languages folder.
IchBin™        TinyPortal
Coding Guidelines       

Offline j_jindal1

  • Semi-Newbie
  • *
  • Posts: 97
    • Shayri forum of Friends
Re: TinyPortal
« Reply #1092 on: February 12, 2011, 08:24:49 PM »
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

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
Re: TinyPortal
« Reply #1093 on: February 12, 2011, 11:40:30 PM »
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
Coding Guidelines       

Offline j_jindal1

  • Semi-Newbie
  • *
  • Posts: 97
    • Shayri forum of Friends
Re: TinyPortal
« Reply #1094 on: February 13, 2011, 12:08:38 AM »
I'm using English-UTF8
www.ShayarFamily.com Shayri forum of Friends

Offline IchBin™

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,115
  • Gender: Male
  • I don't speak German.
Re: TinyPortal
« Reply #1095 on: February 13, 2011, 12:37:37 AM »
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
Coding Guidelines       

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: TinyPortal
« Reply #1096 on: February 15, 2011, 04:53:02 PM »
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.

Offline DarkAngel612

  • Sophist Member
  • *****
  • Posts: 1,044
  • Gender: Female
Re: TinyPortal
« Reply #1097 on: February 15, 2011, 06:19:52 PM »
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

Offline bigjoe11a

  • Sr. Member
  • ****
  • Posts: 851
  • Gender: Male
  • My Name is Joe, and I code in PHP and C#
    • Delta Force Barracks
Re: TinyPortal
« Reply #1098 on: February 15, 2011, 07:36:31 PM »
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.

Offline DarkAngel612

  • Sophist Member
  • *****
  • Posts: 1,044
  • Gender: Female
Re: TinyPortal
« Reply #1099 on: February 15, 2011, 09:04:45 PM »
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