Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (416)
games submitted by our members
Games in WIP (306)
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 1727 times)
0 Members and 1 Guest are viewing this topic.
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 463
Projects: 4


Hand over your head.


« Posted 2011-09-21 01:43:54 »

 persecutioncomplex

Please report bugs. Tongue

Hi, appreciate more people! Σ ♥ = ¾
Learn how to award medals... and work your way up the social rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline theagentd
« Reply #1 - Posted 2011-09-21 01: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: 463
Projects: 4


Hand over your head.


« Reply #2 - Posted 2011-09-21 01: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Games published by our own members! Check 'em out!
Try the Free Demo of Droid Assault
Offline Cero
« Reply #3 - Posted 2011-09-21 02: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 02: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: 11
Projects: 2


Make it work; make it better.


« Reply #5 - Posted 2011-09-21 03: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: 291
Projects: 2


I'm the King!


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

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

Offline Mickelukas

JGO Ninja


Medals: 40
Projects: 2


Java guru wanabee


« Reply #7 - Posted 2011-09-21 08: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

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 463
Projects: 4


Hand over your head.


« Reply #8 - Posted 2011-09-21 13: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline Riven
« League of Dukes »

JGO Overlord


Medals: 463
Projects: 4


Hand over your head.


« Reply #9 - Posted 2011-09-21 13: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 53
Projects: 15


★★★★★


« Reply #10 - Posted 2011-09-21 13: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: 463
Projects: 4


Hand over your head.


« Reply #11 - Posted 2011-09-21 13: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline JL235

JGO Coder


Medals: 10



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

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

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 463
Projects: 4


Hand over your head.


« Reply #13 - Posted 2011-09-21 13: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 53
Projects: 15


★★★★★


« Reply #14 - Posted 2011-09-21 13: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 15: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: 463
Projects: 4


Hand over your head.


« Reply #16 - Posted 2011-09-21 15: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline Cero
« Reply #17 - Posted 2011-09-21 15:25:17 »

yeah that's right.

Offline ra4king

JGO Kernel


Medals: 291
Projects: 2


I'm the King!


« Reply #18 - Posted 2011-09-22 01: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: 463
Projects: 4


Hand over your head.


« Reply #19 - Posted 2011-09-22 21: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Offline Mickelukas

JGO Ninja


Medals: 40
Projects: 2


Java guru wanabee


« Reply #20 - Posted 2011-09-23 00: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

Offline Riven
« League of Dukes »

JGO Overlord


Medals: 463
Projects: 4


Hand over your head.


« Reply #21 - Posted 2011-09-23 01: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 rankings
Projects: Revenge of the Titans, Titan Attacks, Droid Assault, and Ultratron
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Get high quality music tracks for your game!

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

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
BrassApparatus (4 views)
2013-06-19 08:52:37

NegativeZero (10 views)
2013-06-19 03:31:52

NegativeZero (12 views)
2013-06-19 03:24:09

Jesse_Attard (17 views)
2013-06-18 22:03:02

HeroesGraveDev (59 views)
2013-06-15 23:35:23

Vermeer (59 views)
2013-06-14 20:08:06

davedes (58 views)
2013-06-14 16:03:55

alaslipknot (52 views)
2013-06-13 07:56:31

Roquen (73 views)
2013-06-12 04:12:32

alaslipknot (58 views)
2013-06-10 19:30:18
Smoothing Algorithm Question
by UprightPath
2013-05-28 02:58:26

Smoothing Algorithm Question
by UprightPath
2013-05-28 02:57:33

Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38
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!