• Welcome to Simple Machines Community Forum. Please login or sign up.

Redirection Boards

Started by Oldiesmann, October 18, 2004, 07:01:58 AM

Previous topic - Next topic

L.G.S

FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Oldiesmann

Re-uploaded the file. I'm not sure why you were getting errors in WinRar, but I recommend using UltimateZip instead...
Michael Eshom
Cincy Space - now open!

Søren Bjerg

Doubt the problem lies with WinRAR.

When viewing ./index.php?action=packages;sa=browse after uploading the archive, all I get is a white blank screen. Deleting the archive again renders the page as it's supposed to again.

Maybe the problem lies with UltimateZip, if that's what you use to archive it with :P.
RUNE HORDES dot INFO - SMF 1.1.10 w/ Custom Profile Mod... and various permissions hooks and template changes (new topic form).

L.G.S

will there ever be a 'clicks' amount where the post count should be for this mod?
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


Søren Bjerg

Like in the third picture?
RUNE HORDES dot INFO - SMF 1.1.10 w/ Custom Profile Mod... and various permissions hooks and template changes (new topic form).

Oldiesmann

April 26, 2006, 04:38:51 PM #125 Last Edit: April 26, 2006, 04:40:44 PM by Oldiesmann
Currently the click count is displayed in the Last Post column because there's more room there and it looks nicer there... It probably wouldn't be too hard to display click count there, but I don't plan to change the location of this unless a lot of people really demand it.
Michael Eshom
Cincy Space - now open!

Oldiesmann

Seems the package somehow got corrupted. I was able to salvage the files though and re-uploaded a working archive. Sorry about that :)
Michael Eshom
Cincy Space - now open!

Søren Bjerg

I'm beginning to think my problems have something to do with the Topic Ratings mod, as I still get the error messages. Sadly I get errors trying to uninstall that one, so I can't easily test it out.
RUNE HORDES dot INFO - SMF 1.1.10 w/ Custom Profile Mod... and various permissions hooks and template changes (new topic form).

L.G.S

Quote from: Søren Bjerg on April 26, 2006, 03:57:32 PM
Like in the third picture?

I didn't know it was a hit area because it had no numbers on it
FREE and LIVE World Cup + Premier League football streams:

www.gamesandgoals.com


rockinaway

Problems still, when i try applying mod I get this message:

QuoteThe package you are trying to download or install is either corrupt or not compatible with this version of SMF.

Why am I getting this?
Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

rockinaway

April 27, 2006, 01:31:08 PM #130 Last Edit: April 27, 2006, 01:43:02 PM by rockinaway
Problem Solved!

But think I have found a small error. In the installation steps in the files Sources/Sub-Boards.php:


<operation>
<search position="replace"><![CDATA[
'prev_board' => $prevBoard
]]></search>
<add><![CDATA[
'prev_board' => $prevBoard,
'is_redirect' => $row['is_redirect'],
'count_clicks' => $row['redirect_count_clicks'],
'target' => $row['redirect_target'],
'url' => $row['redirect_url']
]]></add>
</operation>


I think should be:

<operation>
<search position="replace"><![CDATA[
'prev_board' => $prevBoard,
]]></search>
<add><![CDATA[
'prev_board' => $prevBoard,
'is_redirect' => $row['is_redirect'],
'count_clicks' => $row['redirect_count_clicks'],
'target' => $row['redirect_target'],
'url' => $row['redirect_url'],
]]></add>
</operation>


The comma missing in search would cause two commas to occur if I am not wrong? Also comma missing after 'url' => $row['redirect_url'] is missing, cuases an escape thing. New to this stuff so probably wrong, only checked as the file couldnt be edited automatically :D
Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

Oldiesmann

I'll take a look at it again. Someone else is reporting an error when clicking modify after making a redirection board, so this might be related...
Michael Eshom
Cincy Space - now open!

rockinaway

Have a problem, when I try adding a new board WITHOUT redirection selected I get this error:


You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1,
1,
redirect_url = '',
redirect_target = '',
is_rated = 0
W' at line 14
File: /home/.endora/etcworld/etcworld.co.uk/forum/Sources/Subs-Boards.php
Line: 1042



The lines in that area are, with 1042 as last lines:



// Set the permission mode (normal, no-polls, reply-only, read-only).
if (isset($boardOptions['permission_mode']) && empty($modSettings['permission_enable_by_board']))
$boardUpdates[] = 'permission_mode = ' . $boardOptions['permission_mode'];

// Is this a redirection board?
if (isset($boardOptions['is_redirect']))
$boardUpdates[] = 'is_redirect = ' . ($boardOptions['is_redirect']) ? '1' : '0';

// Counting clicks?
if (isset($boardOptions['count_clicks']))
$boardUpdates[] = 'redirect_count_clicks = ' . ($boardOptions['count_clicks']) ? '1' : '0';

// Resetting clicks?
if (isset($boardOptions['reset_clicks']) && $boardOptions['reset_clicks'])
$boardUpdates[] = 'redirect_clicks = 0';

// Redirection URL
if (isset($boardOptions['url']))
$boardUpdates[] = 'redirect_url = \'' . $boardOptions['url'] . '\'';

// Redirection URL target
if (isset($boardOptions['target']))
$boardUpdates[] = 'redirect_target = \'' . $boardOptions['target'] . '\'';

if(isset($boardOptions['is_rated']))
$boardUpdates[] = 'is_rated = ' . ($boardOptions['is_rated'] ? '1' : '0');

// Do the updates (if any).
if (!empty($boardUpdates))
$request = db_query("
UPDATE {$db_prefix}boards
SET
" . implode(',
', $boardUpdates) . "
WHERE ID_BOARD = $board_id
LIMIT 1", __FILE__, __LINE__);



I tried changing the order still doesnt work, any help?

Then when I try with redirection it says that 'An Error Has Occured' but there is no message!.. please help
Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

Oldiesmann

I think these are because you had the topic ratings mod installed prior to installing redirection boards - some of the changes made by that mod probably conflicted with some changes made by this one. Unfortunately I haven't had much time to test the two together, but will try to do so soon.
Michael Eshom
Cincy Space - now open!

Oldiesmann

Found the problem...

The blank error message is due to a missing language string that's supposed to say "Redirection boards must have a URL!". However, you're getting the error because I re-named a couple of input boxes and forgot to change where it sets the values based on these. A new version of the package will be uploaded shortly, but you can fix it by doing this:

Sources/ManageBoards.php

Find
$boardOptions['url'] = isset($_POST['url']) ? $_POST['url'] : '';
$boardOptions['target'] = isset($_POST['target']) ? $_POST['target'] : '';

// You can't have a redirection board without specifying where to send them to!
if($boardOptions['is_redirect'] && $boardOptions['url'] == '')
{
fatal_lang_error('redirect_no_url', false);
}


Replace
$boardOptions['url'] = isset($_POST['redirect_url']) ? $_POST['redirect_url'] : '';
$boardOptions['target'] = isset($_POST['redirect_target']) ? $_POST['redirect_target'] : '';

// You can't have a redirection board without specifying where to send them to!
if($boardOptions['is_redirect'] && $boardOptions['url'] == '')
{
fatal_lang_error('redirect_no_url', false);
}
Michael Eshom
Cincy Space - now open!

Oldiesmann

Ok. New version of the mod is up. As always let me know if you run into any additional problems.
Michael Eshom
Cincy Space - now open!

Søren Bjerg

I get this now...

QuoteDatabase Error

You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '1,
1,
redirect_url = '{the actual url written here now}',
red
File: /customers/xxx/httpd.www/forums/Sources/Subs-Boards.php
Line: 1036
...but again, it might have something to do with the Topic Ratings mod.

Will try installing it on my local Topic Ratingsless installation when I get home from work. Should shed some light :).
RUNE HORDES dot INFO - SMF 1.1.10 w/ Custom Profile Mod... and various permissions hooks and template changes (new topic form).

rockinaway

Yes that error still remains, any help?
Have I helped you? Then please join AdminFuel - The forum for forum administrators.

If you need help managing your forum, or maybe launching it, then visit us and view the quality articles, downloads and posts.

Oldiesmann

I think I've finally fixed it. I was setting the redirect_count_clicks and is_redirect values incorrectly:

$boardUpdates[] = 'redirect_count_clicks = ' . ($boardOptions['count_clicks']) ? '1' : '0'; instead of $boardUpdates[] = 'redirect_count_clicks = ' . ($boardOptions['count_clicks'] ? '1' : '0');

There is a slight difference in the way those statements are evaluated:

First statement - if redirect_count_clicks and $boardOptions['count_clicks'] are the same, the next value in the boardUpdates[] array should be 1, otherwise it should be 0

Second statement - the next value in the boardUpdates[] array should be "redirect_count_clicks = 1" if $boardOptions['count_clicks'] is true, otherwise it should be "redirect_count_clicks = 0".
Michael Eshom
Cincy Space - now open!

Søren Bjerg

April 28, 2006, 02:30:01 PM #139 Last Edit: April 28, 2006, 02:37:24 PM by Søren Bjerg
That solved the error message :D.

The board index doesn't display properly on my end, though, but I'll see if changes were actually done to the files - had problems with another mod, which would successfully install... but some of the changes wouldn't be made to the actual file.

EDIT #1: Hmm, the changes were done to the files. An 'empty' board is shown on the bottom of the category as seen here. The redirection board is "ItloS 2 Tournament [www]" found here. Looks like a normal board.

"Target for the URL" isn't honored either :S.
RUNE HORDES dot INFO - SMF 1.1.10 w/ Custom Profile Mod... and various permissions hooks and template changes (new topic form).

Advertisement: