51
wtravel
Re: Problem with myAds

Hi Reynaldo,

Great work once again! I would like to slidely modify it for my own url form. In order to figure out the method I should use I was looking into your code.

I found in the code:

preg_match("/[\/]*[^\/]*\/([^-]+)\-*([^-]*)\-?([^-]*)\-?([^-]*)\-?([^-]*)\-?([^-]*)".
"\-?([^-]*)\-?([^-]*)\-?([^-]*)\-?([^-]*)\-*([^-]*)\-?([^-]*)\-*([^-]*)\-?([^-]*)".
"\-?([^-]*)\-?([^-]*)\-?([^-]*)\-?([^-]*)\.html/i", $request, $matches);

Why is in some cases a variable: -?([^-]*)\ and then somewhere in the middle it is: -*([^-]*)\

Regards,

Martijn


52
reynaldo
Re: Problem with myAds
  • 2004/2/28 8:06

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Martinjn:

I'm glad you liked it

Martin, in order to customize it, you have to edit loadpage.php AND xoops_shorturls.php, you should be careful to not break anything.

Regarding your questions:
When a character is followed by "?" it means that character can appear 0 or 1 times. When it is followed by "*" it means it can appear 0 or infinite times.

So:
-? means "" or "-"
-* means "" or "--------------------...infinite"

In the line you posted this distinction is non necessary, and it is there because I forgot to change those parts from "*" to "?" after doing some modifications, LOL.

Can you give me an example of what kind of URLs you want? maybe I can help you with it

53
JackJ
Re: ShortURLs 0.3 just released!
  • 2004/2/28 11:40

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Hi reynaldo

Quote:
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.


No I am not running XOOPS within a directory

In a further post you asked for paths etc:

Editing a news article and clicking on "Edit" from News page (works fine)

http://www.macambridge.com/modules/news/admin/index.php?op=edit&storyid=36

Editing a news article and clicking on "Edit" an individual article from News Admin

Browser Path

http://www.macambridge.com/admin-index-op-edit-storyid-36.html

Error:

Warning: chdir(): No such file or directory (errno 2) in /home/macambri/public_html/loadpage.php on line 74

I am using chapis spaw news hack

Clicking on Edit Article in Soapbox

Error

http://www.macambridge.com/admin-article-op-mod-articleID-1.html

Warning: chdir(): No such file or directory (errno 2) in /home/macambri/public_html/loadpage.php on line 74

Warning: main(article.php): failed to open stream: No such file or directory in /home/macambri/public_html/loadpage.php on line 76

Warning: main(): Failed opening 'article.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/macambri/public_html/loadpage.php on line 76

Edit just noticed its the same with editing a wfsections article:

http://www.macambridge.com/admin-index-op-edit-articleid-1.html

error
Warning: chdir(): No such file or directory (errno 2) in /home/macambri/public_html/loadpage.php on line 74




I have XOOPS 2.06, all the other paths working fine so far. I downloaded your latest hack and using your htaccess


#If you have already a custom .htaccess file, just
# add the following lines to the end of it.

RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-s
RewriteRule ^.*\.html loadpage.php [L]

RewriteRule ^$ loadpage.php [L]

Edit: I cant edit anything in any module, same error, must be something throwing the paths off in admin. But if its working for others, I dont know what it might be in my setup thats causing this

thanks

54
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 14:00

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


JackJ:

Found the cause for your error. I couldn't reproduce it on my sites because the fix was already there and for some reason (sleep deprivation?) I forgot to add it before releasing it.

I'll be posting it in a few minutes.
Thanks!

55
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 14:30

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


JackJ:

I've corrected the cause for the error you were getting, It's strange no one reported before. You can download again the full package at
http://www.wtmmail.com/XoopsShortUrls/ShortURLs_0.3_for_Xoops.zip

or you can download the only changed file:
http://www.wtmmail.com/XoopsShortUrls/xoops_shorturls.txt
rename it to xoops_shorturls.php and overwrite the previous one.

Everyone is encouraged to apply that fix.

Thanks everyone, and please report any problems you may have.

56
Mikhail
Re: ShortURLs 0.3 just released!
  • 2004/2/28 14:40

  • Mikhail

  • Just can't stay away

  • Posts: 412

  • Since: 2003/1/19


reynaldo, you are very creative.... thanks a lot for yours scripts...

57
reynaldo
Re: ShortURLs 0.3 just released!
  • 2004/2/28 14:44

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Mikhail:

Thank you for your kind works, I'm glad you like it, I was about to PM you to let you know about this last fix.:)

58
aubrey
Re: Problem with myAds
  • 2004/2/28 15:06

  • aubrey

  • Just popping in

  • Posts: 31

  • Since: 2004/2/1 2


Reynaldo:

the new loadpage.php is uploaded, and I also just uploaded the new xoops_shorturls.php.

You are doing a wonderful job of support,

Aubrey

59
reynaldo
Re: Problem with myAds
  • 2004/2/28 15:16

  • reynaldo

  • Not too shy to talk

  • Posts: 106

  • Since: 2004/2/13


Aubrey:

Now it is getting weird!, hehehe, I just checked your site and the variables are being set. Are you using a modified version of myAds?

60
JackJ
Re: ShortURLs 0.3 just released!
  • 2004/2/28 15:17

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


Fix works, great, thanks

In fact I am sure my pages are loading faster with this shorturl hack, might be my imagination..

I had downloaded the full program link from your last post, and tried that, but no change, then I downloaded the text file and used that and the fix worked.

thanks again

Login

Who's Online

155 user(s) are online (90 user(s) are browsing Support Forums)


Members: 0


Guests: 155


more...

Donat-O-Meter

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

Latest GitHub Commits