2014년 12월 1일 월요일

how would I setup auto slug in Tumblelog?

I finished the tumblelog tutorial, and its working well. I would like to change it so that the user does not have to type in the slug nor for it to show up when posting, and in code default it to lowercase and to replace spaces with dashes, for example:
Title: "My Great Title"
Slug: my-great-title

I could have it auto fill the slug field with javascript, and have the user edit it if they want too. But I want to know if its possible the way I described.

Furthermore, how would one include other data with post? for example, I would like to include the IP address of the user and have that stored in the database.


댓글 없음:

댓글 쓰기