Redirection Boards

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

Previous topic - Next topic

Master of Eternity

Hi whenever I try to Install this Mod it gives the Following Error:

Installing this package will perform the following actions:
   Type                                      Action                  Description
1.    Execute Code                     RedirectPdb.php    
2.    Execute Modification    -                                Modification parse error

I don't know what is wrong. Can Anyone help? I use SMF 1.1.2

TrueSatan

 You need to do a manual installation...the error simply tells you that that file has been previously modified and thus it is not the same as the unmodified file the mod is geered to change.

TrueSatan

Quote from: CaNe on March 14, 2007, 04:04:18 AM
Quote from: Greenman on March 13, 2007, 04:58:46 AM
^ Then obviously they might be causing it... :-\


Anyways, I fixed my above error, but now everytime I view any board I get:
QuoteParse error: syntax error, unexpected ',' in /.../Themes/babylon/MessageIndex.template.php on line 111

and here is line 111:
Quoteecho ($board['redirect_clicks'] == 1 ? $txt['redirected_click'] : '<b>', $board['redirect_clicks'], '</b> ', $txt['redirected_clicks']);


I don't see anything wrong with it, and tried taking out the ","s one by one and all together, but they need to be there for things to work properly.

help? :(

Umm actually this is the mod i tryed to install first before any others and this is what i got. i uninstalled all my other mods and retryed still the same thing.

Unless your forum was entirely new and had never had any mods or edits applied to it it is highly likely that past alterations left behind remnants of themselves despite your uninstallations. These are not the fault of this mod. You may need to start again with a fresh file set on a test forum...add in all the mods you want making sure that they work properly...backup your live/production forum database and the files of your live forum...using the backup of your live/production forum copy it to a new database...link a fresh installation of SMF to that database...add in the mods you checked via your test forum...check everything...test extensively. When you are entirely satisfied that all is well copy the files except for the settings.php and settings.php.bak in the forum root...making sure you still have the copy of them that you took earlier delete all save these files from your live/production forum and copy the files from the second forum in their place.

This may sound like hard work...it's not that hard or that much work...it will give you clean files without the chaff left over from umpteen install/uninstall operations.

papabill

I'd love to have this option, but I keep getting this error:

Duplicate column name 'is_redirect'
File: C:\Apache2\htdocs\Packages\temp\RedirectPdb.php
Line: 44
Computer Help available:
Computer help: $52.00 hr.
Computer help while you watch: $92.00 hr.
Computer help with your advice: $152.00 hr
Computer help with your assistance: $252.00 hr

GravuTrad

no generic solution for this kind of bug?
On a toujours besoin d'un plus petit que soi! (Petit!Petit!)


Think about Search function before posting.
Pensez à la fonction Recherche avant de poster.

crappyday

Quote from: Master of Eternity on March 23, 2007, 08:05:50 AM
Hi whenever I try to Install this Mod it gives the Following Error:

Installing this package will perform the following actions:
   Type                                      Action                  Description
1.    Execute Code                     RedirectPdb.php    
2.    Execute Modification    -                                Modification parse error

I don't know what is wrong. Can Anyone help? I use SMF 1.1.2
Quote from: TrueSatan on March 23, 2007, 08:13:03 AM
You need to do a manual installation...the error simply tells you that that file has been previously modified and thus it is not the same as the unmodified file the mod is geered to change.

Umm, so manual installation is needed if I downloaded it here twice but got the same error?  I can install it but is there a problem?
 


TrueSatan

When you see an error like the one quoted it tells you that the automatic installer won't be able to do a complete installation...it probably can install into the files it shows as "passed". You can thus save on some work by copying all the files that the mod seeks to modify to your local machine, running the automatic installer and ignoring, for the moment, the failed items. copying to your local machine again (but not overwriting the previous copy) the files. Compare the files the installer claimed to have passed and see if it did install properly into those...if so then that's fine and it's saved you form having to do it. Manually install into those files the automatic installer couldn't handle. On your server rename the old versions of the files you manually install into then upload the new (manual install) versions of them.

Done this way you keep the files you alter on your server so that you can quickly revert to them if there is a problem with your manual install....to revert run the package manager automatic uninstall then manually revert the files you manually altered.

BTW remember never to do such work on a live/production forum...get two test forums...one completely fresh with no mods, themes or fiddling about on it...keep it that way by backing it up in pristine state and restoring the pristine state over it after each use...use it to test that a mod etc works at all...if it works in that then your second test forum should be a copy of the files and database of your live forum...install into that and you'll be able to see if it would be practical/safe to install into your live/production forum...do a lot of testing first though.

BigMike

I've got it installed on 1.1.2 and it is a hit-or-miss mod

If I am logged in as an admin, then it just directs me to the new (blank) board with no messages...

If I am logged in as a usual member, then it works just fine.

If I am viewing the forum as a guest, then it just directs me to the new blank board with no messages... like it does if I'm logged in as the admin.



Then when I change 1 setting, "Count all clicks?", then it stops working for regular members and starts working for guests. The admin still cannot view it.

Crazy

Any ideas? I just double checked the coding and everything is there correctly.

Has anyone gotten this to work perfectly with 1.1.2?

Since I only need this to work for one board, I think I can write a script that will check what the URL is, and if it detects the correct board url (in my case "board=63.0") then I can have it replace the url with the new url that I want to redirect to.

That would be a good temp. fix, but I like having the counter of the redirects and such working..

Anyone? Thanks
Mike

BigMike

I just found out that when it does not redirect me, instead taking me to the empty board I created (index.php?board=63.0), after I let my browser (firefox v2) sit there for a while, if I hit reload, then all of a sudden it redirects me to my specified url.

crazy

It only does this if you let it sit for a while. If you hit F5 F5 F5 F5 at first, then nothing happens. But if I leave the window open for a while, and then reload it, then it magically redirects.

BigMike

More info:

When I enable a target for "_blank", it does open up a new window, but it then loads the new empty board #63 in this new window instead of redirecting.

So everything seems to work except for the actual redirection, which sometimes works and sometimes doesnt.

I've got class tonight, so I will check back here later on this evening

Thanks
BigMike

BigMike

Wow, I just replaced

file load.php
header('Location: ' . $row['redirect_url']);

with

header('Location: http://my.actual/redirected.url');

and now it will redirect admins but not guests or regular members lol

BigMike

#291
I am home now but I don't have much time to play with this mod right now, so I got a quick workaround to ......... work ;D

What I did was I deactivated the board (so that it is no longer a redirect) and then posted a new (and only) thread in the newly created board.

This new thread has a link that the user may manually direct himself to (the link that I want the board to redirect to).

Then I reactivated the board as a redirect.

Now, when the redirect script randomly does not redirect the user, the user sees that there is 1 thread in the new board. It's subject is the same as the directed link's title to entice the user to click on it. Then when the forum tries to load a thread that is within a redirect board, it naturally redirects the user to the redirect url.

This lame work around works and I'm happy for now.

G'Night
BigMike

tsmalmbe

I made use of the "target" field as a URL to an image instead. I hardcoded the target-parameter because I don't need that. This enables me to use an image as the link (instead of plain text).

It would be nice to have both the target AND a place to put an image aswell. Perhaps in a future  version?

..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

tsmalmbe

I made use of the "target" field as a URL to an image instead. I hardcoded the target-parameter because I don't need that. This enables me to use an image as the link (instead of plain text).

It would be nice to have both the target AND a place to put an image aswell. Perhaps in a future  version?

..:: http://www.kontrollrummet.com - Studio och musik ::.. RSS?

Oldiesmann

I will look into adding an image feature in the next version. I need to go through this one and fix any remaining bugs first.
Michael Eshom
Christian Metal Fans

Oldiesmann

Ok. Try it now. I just uploaded a new package that fixes the following bugs:

"Duplicate column" errors (reason: SHOW COLUMNS returns the column names in a column called "Field", not "name")
Changed "in_array()" to "array_key_exists()" in RedirectPdb.php (in_array() looks at array values, but column names are keys)
Fixed parse error in Babylon template files
Fixed path to Babylon theme's BoardIndex.template.php

Hopefully that will fix everything. It will not fix the "Modification parse error" issue with PHP 5.2 though - this is a known issue with SMF that seems to be related to the size of the modification files, but I will need to split the mod into two separate modification files for this, and didn't want to confuse those who are still stuck on 1.0.10.
Michael Eshom
Christian Metal Fans

GravuTrad

Yeah!

perfect for me oldies!

perfect install and perfect use. no more problem for me. ;D
On a toujours besoin d'un plus petit que soi! (Petit!Petit!)


Think about Search function before posting.
Pensez à la fonction Recherche avant de poster.


SaltedWeb

There are no additions in my board menu it installed fine but
wheres the beef ????


Cozmo
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

Exsharaen

Broken package? I tried to install in SMF 1.1.2 and found that it couldn't install: not a valid package or may be broken...

I do really hope SMF 2.0 will make this a default feature... (phpBB3 does).

Advertisement: