TinyPortal

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

Previous topic - Next topic

IchBin™

If you read the mod description it should give you a good idea. :)
http://mods.simplemachines.org/index.php?mod=97
IchBin™        TinyPortal

KirkhamsEbooks

Love Tinyportal just made a small donation (and was promptly redirected to a page to buy more stuff  :))

You knew there was a but right?

I miss being able to link to categories! I used to be able to have a category show on top by posting forumlink#c3 or whatever. I tried the tinyportal version ?forum=6 or something like that which showed on the url, but it still took me to the top of the forum instead of placing the category I was selecting on top.

any thoughts or ideas?

Version Information:
Forum version: SMF 2.0.4
Current SMF version: SMF 2.0.5

Rick

IchBin™

Hard to tell what you're talking about, but it looks like you're talking about forum categories? I believe having a category show like you are describing, requires a modification to make that feature. This is not something that comes with TP.
IchBin™        TinyPortal

KirkhamsEbooks

Actually it existed before I installed Tinyportal Going into a board then clicking up to the category placed that category on top of the web page so copying that url would place the category on top of the viewers page when he/she clicked on the link if I provided it.

This feature no longer exists after installing Tinyportal

Rick

KirkhamsEbooks

Here's an example

http://www.computerhelp808.com/MoreHelp/index.php#c2

Note that this category is not the first category of the forum.

Rick

IchBin™

Can't test it on your site since it appears you've removed TP. I'll take a look at the code and see if it's doing something strange.
IchBin™        TinyPortal

IchBin™

Ah yes I do see a problem, which I can only assume is the one you are talking about. Although, it doesn't happen on the category links, it only happens in the linktree. If that is your problem, you can fix it by looking for this code in the the Sources/Load.php file.

'url' => $scripturl . '?action=forum#' . $board_info['cat']['id'],

Change it to this:
'url' => $scripturl . '?action=forum#c' . $board_info['cat']['id'],
IchBin™        TinyPortal

KirkhamsEbooks

Quote from: IchBin™ on August 17, 2013, 09:24:45 PM
Can't test it on your site since it appears you've removed TP. I'll take a look at the code and see if it's doing something strange.

Thank you for the code. I did not remove it I had to find one of my forums without Tinyportal. The one inwhich the category links do not work is http://godsbusinessway.com

http://www.godsbusinessway.com/index.php#c25 would be an example. It's supposed to go to a category discussing Mila.

Rick

IchBin™

Did the code fix your problem?  I can't view the category links as a guest so I can't really test the problem on that site.
IchBin™        TinyPortal

DarkAngel612

LOL no idea if he tried it or not but I did on my forums and it works beautifully.

I too noticed that when the SMF forums are with TP that the category in breadcrumbs takes you back to it if clicked, which disappeared once TP was installed----many, many, many versions ago...LOL

Never thought to ask about it so glad to have found this thread....works in 2.0.5SMF
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.1.4 with various mods and TinyPortal

KirkhamsEbooks

Since TP took over my index I have to change the url, but it now ends up on top as it should.

http://www.godsbusinessway.com/index.php?action=forum#c28

Unless there's a way to change that so other links I have on the web don't need to be changed I will be happy with this.

Thank you

Rick

IchBin™

If you want the old incorrect link to still work, I'd suggest you put some apache redirects in to your server config to forward the old links to the new ones. There's tons of info out there that can show you how to do this.
IchBin™        TinyPortal

MoreBloodWine

I seem to be experiencing an issue.

Whenever I try to use the following code in a left block I get the the following forbidden error. The code worked fine before and for the life of me I can't figure out what changed to now cause the forbidden error when trying to save the block.

echo '
<center><b><u><font size="3">Milestones</font></u></b></center>
';

global $smcFunc;
$increments = 25;
$data1 = $smcFunc['db_query']('',
'SELECT date_registered
FROM {db_prefix}members AS milestones
WHERE id_member % {int:increments} = 0
ORDER BY date_registered DESC',
array(
'increments' => $increments,
)
);
$dates = array();
while ($row1 = $smcFunc['db_fetch_assoc']($data1))
$dates[] = $row1;

$total = $increments * count($dates);
echo '
<div style="overflow: auto; width: auto; height: 50px; border: none; text-align: left; font-size: 13px; padding-top: 3px;">
';
foreach($dates as $row1)
{
echo date('n/j/Y', strftime($row1['date_registered'])), " - ", number_format($total), " Users Gained !<br />";
$total -= $increments;
}
echo'
</div>
';



QuoteForbidden
You don't have permission to access /index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


lurkalot

Quote from: MoreBloodWine on September 16, 2013, 10:40:22 PM
I seem to be experiencing an issue.

Whenever I try to use the following code in a left block I get the the following forbidden error. The code worked fine before and for the life of me I can't figure out what changed to now cause the forbidden error when trying to save the block.

echo '
<center><b><u><font size="3">Milestones</font></u></b></center>
';

global $smcFunc;
$increments = 25;
$data1 = $smcFunc['db_query']('',
'SELECT date_registered
FROM {db_prefix}members AS milestones
WHERE id_member % {int:increments} = 0
ORDER BY date_registered DESC',
array(
'increments' => $increments,
)
);
$dates = array();
while ($row1 = $smcFunc['db_fetch_assoc']($data1))
$dates[] = $row1;

$total = $increments * count($dates);
echo '
<div style="overflow: auto; width: auto; height: 50px; border: none; text-align: left; font-size: 13px; padding-top: 3px;">
';
foreach($dates as $row1)
{
echo date('n/j/Y', strftime($row1['date_registered'])), " - ", number_format($total), " Users Gained !<br />";
$total -= $increments;
}
echo'
</div>
';



QuoteForbidden
You don't have permission to access /index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

A mod security issue perhaps.  Ask your host to check, and turn it off.

MoreBloodWine

Quote from: lurkalot on September 17, 2013, 02:14:56 AM
Quote from: MoreBloodWine on September 16, 2013, 10:40:22 PM
I seem to be experiencing an issue.

Whenever I try to use the following code in a left block I get the the following forbidden error. The code worked fine before and for the life of me I can't figure out what changed to now cause the forbidden error when trying to save the block.

echo '
<center><b><u><font size="3">Milestones</font></u></b></center>
';

global $smcFunc;
$increments = 25;
$data1 = $smcFunc['db_query']('',
'SELECT date_registered
FROM {db_prefix}members AS milestones
WHERE id_member % {int:increments} = 0
ORDER BY date_registered DESC',
array(
'increments' => $increments,
)
);
$dates = array();
while ($row1 = $smcFunc['db_fetch_assoc']($data1))
$dates[] = $row1;

$total = $increments * count($dates);
echo '
<div style="overflow: auto; width: auto; height: 50px; border: none; text-align: left; font-size: 13px; padding-top: 3px;">
';
foreach($dates as $row1)
{
echo date('n/j/Y', strftime($row1['date_registered'])), " - ", number_format($total), " Users Gained !<br />";
$total -= $increments;
}
echo'
</div>
';



QuoteForbidden
You don't have permission to access /index.php on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

A mod security issue perhaps.  Ask your host to check, and turn it off.
Before I goto my host, is that the only thing that comes to mind ?

http://www.eojmarket.com/php_info.php
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


lurkalot

Quote from: MoreBloodWine on September 17, 2013, 03:02:17 AM

Before I goto my host, is that the only thing that comes to mind ?


Well, your code works for me on my testsite, and my http://guitaristguild.com site.  Second block down on left.  ;)

MoreBloodWine

I shoulda mentioned this earlier but I brain farted... it works fine when saving and displaying on my one sitee I havent touched in some timed. It's my two latest sites having issues with the code, but worked fine before. The only diff between the two faulty sites is that the one was a recent complete file refresh to delete mods.

I can manually edit the code via PHPMyAdmin and it displays n works fine on the site. Just cant edit n save the block with that code in it on two of my three sites.
Want a sig like mine for your BTCGuild stats ? Then check this out: Spend-ur-Bits


IchBin™

mod_security can do many things. But I suspect it is not liking something in your code. See if you can narrow down if it is just a part of the code that it doesn't like. But yeah, definitely mod_security IMO.
IchBin™        TinyPortal

Kindred

try putting that code into a separate php file with an include for SSI.php and try running it....

that way, it won't kill your whole site while you debug
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

DarkAngel612

I offer no assistance cause still learning php but

I did try it at my very finicky site and it worked as you have it posted.

I even moved the block down further, edited the height of the block and it still works.

IF what is showing is what it is supposed to display

http://thefantasiesattic.net/attic/index.php?action=forum

bottom left
Fantasy Attic ::  Fantasies Realm Market :: SMF 2.1.4 with various mods and TinyPortal

Advertisement: