Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (538)
Games in Android Showcase (132)
games submitted by our members
Games in WIP (600)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  New feature: friendly URLs  (Read 2216 times)
0 Members and 1 Guest are viewing this topic.
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Posted 2011-09-20 23:43:54 »

 persecutioncomplex

Please report bugs. Tongue

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline theagentd

« JGO Bitwise Duke »


Medals: 365
Projects: 2
Exp: 8 years



« Reply #1 - Posted 2011-09-20 23:54:03 »

I tried to greet them but they weren't friendly at all. Damn "friendly" URLs! ... What is a friendly URL?
PS: Your avatar is broken.

Myomyomyo.
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #2 - Posted 2011-09-20 23:59:45 »

My avatar is broken because I killed a random pid that was taking too much CPU on my server.

A friendly URL is an URL that doesn't pout.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Cero
« Reply #3 - Posted 2011-09-21 00:50:03 »

of course this is waaay better, as you can finally see from the url what it is
like most news links

but obviously, now all the old links, especially through the forum, are all wrong and lead to 404, unless you kinda redirect them so that it works D=

Offline Cero
« Reply #4 - Posted 2011-09-21 00:51:50 »

ah yes, bug: when you click on thread x page n, it brings you to page 1 always, not page n

http://www.java-gaming.org/posts/tuer-truly-unusual-experience-of-revolution-fps-using-jogl/page-32/view/topicseen.html
last page of TUER, but brings you to page 1

Offline CaptainJester

JGO Knight


Medals: 12
Projects: 2
Exp: 14 years


Make it work; make it better.


« Reply #5 - Posted 2011-09-21 01:48:19 »

http://www.java-gaming.org/posts/go-on-ask-me-anything/message-210832/view/topicseen.html#new brought me to page 1 instead of page 10 where there were a couple of new messages.

Offline ra4king

JGO Kernel


Medals: 356
Projects: 3
Exp: 5 years


I'm the King!


« Reply #6 - Posted 2011-09-21 04:10:06 »

Yep I can also confirm new messages don't get shown, but instead goes to Page 1.

Offline Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #7 - Posted 2011-09-21 06:13:50 »

Only two bugs I can find are the two above.

On the other hand, the url in my signature updated to the new format automatically, neat!

but obviously, now all the old links, especially through the forum, are all wrong and lead to 404, unless you kinda redirect them so that it works D=

He didn't rewrite the forum software but added a couple of rewrite rules, the old url's will still work Wink

Mike

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #8 - Posted 2011-09-21 11:26:35 »

but obviously, now all the old links, especially through the forum, are all wrong and lead to 404, unless you kinda redirect them so that it works D=
Can you show me an example?

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #9 - Posted 2011-09-21 11:29:17 »

http://www.java-gaming.org/posts/go-on-ask-me-anything/message-210832/view/topicseen.html#new brought me to page 1 instead of page 10 where there were a couple of new messages.
Only the URLs with 'topicseen' seemed to be affected. Navigating through pages of threads obviously was tested, and it didn't occur to me that 'topicseen' (reached from 'unread posts') was some kind of special case. Fixed now.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 80
Projects: 15


★★★★★


« Reply #10 - Posted 2011-09-21 11:33:08 »

nice new feature.

edit: ok, my attempt to include a - in the post title didn't test too well, guess would need to test what happens in a new threads title Smiley
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #11 - Posted 2011-09-21 11:39:47 »

nice new feature.

edit: ok, my attempt to include a - in the post title didn't test too well, guess would need to test what happens in a new threads title Smiley
What was expected, what was the actual result?

BTW: message titles don't affect the URL, it's all about the title of the first post. If the topic title is changed, the friendly URL will not change, for obvious reasons.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline JL235

JGO Coder


Medals: 10



« Reply #12 - Posted 2011-09-21 11:40:57 »

Very nice, and adds a new level of polish to the forum.

Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #13 - Posted 2011-09-21 11:47:11 »

He didn't rewrite the forum software but added a couple of rewrite rules, the old url's will still work Wink

I'm using a fairly inefficient approach: buffering the output of SMF into a string, unleashing regex and making a bunch of SQL queries, then sending the result to the browser. The mod_rewrite engine sends REQUEST_URI to a 'prg:/super_secret/mod_rewrite.php' which looks up the 'topic-title' in a new table, mapping topicid<->url_injected_title.

The whole process takes 3ms, which is perfectly acceptable, as SMF itself takes about 200-300ms per page. Stare

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 80
Projects: 15


★★★★★


« Reply #14 - Posted 2011-09-21 11:51:28 »

What was expected, what was the actual result?
Was just curious how you handled - as i noticed that spaces are replaced with - but yeh as you point out posts titles aren't used, only the thread title, thats why it didn't test well Smiley
Offline Cero
« Reply #15 - Posted 2011-09-21 13:12:44 »

but obviously, now all the old links, especially through the forum, are all wrong and lead to 404, unless you kinda redirect them so that it works D=
Can you show me an example?

well I just assumed that would be the case, but isn't
well done and stuff

Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #16 - Posted 2011-09-21 13:17:31 »

So, just because you can come up with a potential bug, you don't even bother to verify it, just saying it is bugged, stating how it goes wrong, wasting my time trying to figure out what's going on.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline Cero
« Reply #17 - Posted 2011-09-21 13:25:17 »

yeah that's right.

Offline ra4king

JGO Kernel


Medals: 356
Projects: 3
Exp: 5 years


I'm the King!


« Reply #18 - Posted 2011-09-21 23:05:09 »

Riven,
Not exactly a bug, but the emails I get from JGO have the old links Smiley

Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #19 - Posted 2011-09-22 19:09:45 »

Completely rewritten, to remove a SPOF* Cranky

Please report any (new) bugs.




* mysql_connect(...) completely breaks after you run service mysqld restart in a long-running PHP process, it tries to reconnect to the old file-descriptor, which is obviously invalid after mysqld comes back up. mod_rewrite -> RewriteMap prg: therefore could stop functioning and the whole forum would be down, forever. I currently store topic-ids and board-ids in the URL, so I can use plain and simple mod_rewrite -> RewriteRule to reconstruct the original SMF URL.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Offline Mike

« JGO Spiffy Duke »


Medals: 86
Projects: 1
Exp: 6 years


Java guru wanabee


« Reply #20 - Posted 2011-09-22 22:41:19 »

Posting url's to other forums using smf changes the url Tongue

For example:
http://stateofprofit.com/forum/index.php/ topic,62.15.html#msg236 (without the space before topic)

becomes:
http://stateofprofit.com/forum/topics/check-this-java-game-out/62/15/view.html#msg236

My current game, Minecraft meets Farmville and goes online Smiley
State of Fortune | Discussion thread @ JGO
Offline Riven
« League of Dukes »

« JGO Overlord »


Medals: 840
Projects: 4
Exp: 16 years


Hand over your head.


« Reply #21 - Posted 2011-09-22 23:11:44 »

Doh! Grin

Will fix that tomorrow-ish.

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

rwatson462 (29 views)
2014-12-15 09:26:44

Mr.CodeIt (20 views)
2014-12-14 19:50:38

BurntPizza (40 views)
2014-12-09 22:41:13

BurntPizza (75 views)
2014-12-08 04:46:31

JscottyBieshaar (37 views)
2014-12-05 12:39:02

SHC (50 views)
2014-12-03 16:27:13

CopyableCougar4 (47 views)
2014-11-29 21:32:03

toopeicgaming1999 (114 views)
2014-11-26 15:22:04

toopeicgaming1999 (102 views)
2014-11-26 15:20:36

toopeicgaming1999 (30 views)
2014-11-26 15:20:08
Resources for WIP games
by kpars
2014-12-18 10:26:14

Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!