81
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 5:31

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


JackJ:

Couldn't reproduce your error even after trying with a XOOPS version installed inside a dir.

I'm editing articles from Admin's panel and everything is working as usual. Could you please post the exact url (you can take out your domain if you want) which is giving you the error?

By the way, I never tried SoapBox before. What a wonderful module!



82
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 5:23

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Quote:

aubrey wrote:
I turned the cache off for myAds, and still got the same problem. It didn't make a difference.

Thanks anyway,

Aubrey


Aubrey, edit loadpage.php and at line #18 set variable $is_debug to 1.
so it becomes this:
//Enable debug?
$is_debug 1;


And then let me know so I can take a look what loadpage.php is trying to do. It's important that you know this would spit out some text lines before XOOPS write anything, so your site would look weird while this setting is enable.



83
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 4:56

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Aubrey:

I have both good and bad news
The good is I think I found the cause for this error, *I think* it is related to Module Caching in XOOPS template engine (Smarty), so if you disable caching, it may just go away.
The bad news is I still don't know how to fix it, but I'm currently looking at it.

I'm looking to confirm if this is the cause. And I can't reproduce your error on my site even after turning Module cache on.
Could you please turn caching off for this module, test it and let me know?



84
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 4:45

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Quote:

JackJ wrote:
This is a very good hack. Same news problem here. Editing soapbox articles from admin has a similar result.


JackJ:
Trying to reproduce your error here without any success
I see you are running XOOPS from within a dir. I will try with that next and see if I can get your error.
Thanks for reporting.




85
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 4:23

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Quote:

carnuke wrote:

Thanks once again Reynaldo for this useful piece of scripting. You will obviously know that there is another script converting to short URLs by kenogui. So I must thank both of you for producing these scripts.

Richard


Richard: (carnuke)

Thank you your kind words
I know about the other script from Kenogui and he made a wonderful job converting GoogleTap from PHPNuke to Xoops, the only reason I didn't like GoogleTap is it's limited to Apache 9 BackReferences (variables) so you can only rewrite urls which have at most 9 variables and if you *would* like to have urls like:
/newbb-viewtopic-topic_id-1-forum-1.html
then you are limited to just 3 additional variables.

That's the reason I decided to put the burden of translating variables on PHP instead of Apache even when it may be a little slower.

Also, the way GoogleTap is coded requires you to edit a lot of files and a lot of lines, making it difficult if you have to upgrade. With ShortURLs you only have to edit 1 line in mainfile.php to turn it on/off.

Unfortunately, Kenogui's hack inherited all those limitations althought he did a excellent job porting GoogleTap.



86
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 4:00

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Quote:

aubrey wrote:
This is a great hack and it works perfectly on my site except for one thing: I use the myAds module, and it appears the two are incompatible.
Aubrey


Aubrey:

What version of myAds are you using?
I'm testing it with version 2.0 and except for images, everything works ok.
I investigated the cause and I'll be providing a 'generic' fix as other modules may also have this problem. If you would like me to send you the fix before I release it, just shout



87
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 3:44

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Quote:

Koreus wrote:
Another thing, now we can't put static html file anymore, It is redirect to loadpage.php


Koreus:
In order to avoid static .html files from being redirected, your .htaccess should be like this:
RewriteEngine on
RewriteCond 
%{REQUEST_FILENAME}   !-s
RewriteRule 
^.*.html loadpage.php [L]
RewriteRule ^$ loadpage.php [L]


The second line makes sure no redirection is done if the static file already exists.

Regarding the other error you are receiving, I would like to take a look at your site, as the url you provided:
http://www.mysite.com/admin-index-op-edit-storyid-XXX.html
should be rewritten to
http://www.mysite.com/modules/admin/index.php?op=edit&storyid=XXX
not the one you said



88
reynaldo
ShortURLs 0.3 just released!
  • 2004/2/27 16:10

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


After taking a deep look at some modules out there, I decided to write ShortUrls from scratch and slightly change the way it work.

I added 'dynamic' support for other modules so you don't have to wait for me to release a version of the hack supporting your favorite module. This have a lot of advantages but may also have a few drawbacks I may be unware of.

I also corrected a few errors the previous version had with comments and some images, and made it possible for the hack to work if you are running XOOPS from inside a dir.

Download it here:
http://www.wtmmail.com/XoopsShortUrls/ShortURLs_0.3_for_Xoops.zip

--------------------------------------------------------------------------------------

The way this hack now works is by converting urls like:
http://www.domain.com/modules/youfavmodule/yourfavscript.php
into
http://www.domain.com/yourfavmodule-yourfavscript.html

Arguments are also converted, so for example:
http://www.domain.com/modules/newbb/viewtopic.php?viewmode=thread&topic_id=1&forum=1&move=prev&topic_time=1077888891
becomes:
http://www.domain.com/newbb-viewtopic-viewmode-thread-topic_id-1-forum-1-move-prev-topic_time-1077888891.html

As you can see, the later is a fully indexable url. This means even your forums will get indexed!!!

As before, I tested this hack and found it perfectly working, BUT:
* If you find an error, I relay on you reporting it here so I can correct it.
* I recommend you to test your site throughfully after applying this hack to be sure everything is working.

What can you do if something is not working as expected?
- Open loadpage.php
- Set $is_debug to 1 ($is_debug = 1;). This will turn on debug functionality and will report what loadpage is trying to do.
- Refresh your site, View Source and send me what you see there, at the top, before the normal HTML begins.

How to install it?
It would be good if you read through the Readme file, but here are the quick instructions:
--------------------------------
1) Upload xoops_shorturls.php and loadpage.php into your XOOPS root dir.
2) Edit your .htaccess file and add the lines found in the .htaccess file I provided. If you are upgrading from a previous version, overwrite the lines you added by previous versions.
3) Edit mainfile.php somewhere around line 27, right before
if ( !defined("XOOPS_MAINFILE_INCLUDED") )

Add the following:
include "xoops_shorturls.php";

It's important that you edit the mainfile.php at your site, not the one you may be have in your hard disk, as they are different.
4) If your homepage is set to a module other than News, open loadpage.php and edit line #20
$defaultmodule "news";

Where it says "news" change it to your default module directory name, for example:
$defaultmodule "mydownloads";


Open your site and if it is working correctly, almost all URLs should be converted to a Search Engine frienly version.

I can't stress enough how important it is you report errors you may encounter.

Enjoy it!



89
reynaldo
Re: ShortURLs hack
  • 2004/2/27 15:13

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Martin:

I think it is possible to do what you say, but right now I'm trying to get ShortURLs to work correctly with the most common modules. After that I can take a look at your request.

All I can say right now is that in order to achieve that, you would have to put all the 'mapping' info into a file and not into a DB. The reason is that the loader file (loadpage.php) is called even before XOOPS is called and adding support for DB queries would make the normal loading process slow for other modules.

Just out of curiosity, why do you what urls to be converted like that? as far as I know Search Engines are giving that much importance to keywords in the file name as they used to a few years ago, and besides, with ShortUrls new ver.0.3, that URL would be /news-location-75.html



90
reynaldo
Re: ShortURLs hack
  • 2004/2/26 20:38

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Quote:

wtravel wrote:
I found the problem, which was a second include of mainfile.php, used in the Amazon results template. Outcommented that line and now it is working.

I'm glad you could find it

Quote:

For me that leaves the question about the possibility of using MySQL queries in the hack. If not, then I think the best alternative would be to change the module so that it uses the location name initially and then get the location ID from that name.

I kinda got lost on this one, would you like to explain further?




TopTop
« 1 ... 6 7 8 (9) 10 11 »



Login

Who's Online

304 user(s) are online (205 user(s) are browsing Support Forums)


Members: 0


Guests: 304


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits