Search found 25 matches

by dotphp
Tue Nov 11, 2014 8:00 am
Forum: Javascript
Topic: submit form with json in Bootstrap
Replies: 1
Views: 4360

submit form with json in Bootstrap

In Bootstrap I have the following piece of code that validate all the fields in the form: /** * Called when all validations are completed */ _submit: function() { var isValid = this.isValid(), eventType = isValid ? this.options.events.formSuccess : this.options.events.formError, e = $.Event(eventTyp...
by dotphp
Sun Jul 20, 2014 1:15 pm
Forum: Javascript
Topic: how backbone.js can help me?
Replies: 1
Views: 3203

how backbone.js can help me?

Hello

I just know that backbone.js is something new.
I really want to know how backbone.js can help me in creating client side projects?
It helps me in create shrother code or I can use it instead of something else ?

Pls help me with this
by dotphp
Mon Jun 18, 2012 6:25 am
Forum: Linux
Topic: simple mod_rewrite
Replies: 0
Views: 13356

simple mod_rewrite

Hi How can I simplify the mod_rewrite: RewriteRule ^picturi~peisaj-rural~([0-9]+)$ index.php?page=picturi&filtru=subiecte-detaliate&tip=peisaj-rural&gal=$1 [QSA,L] RewriteRule ^picturi~peisaj-urban~([0-9]+)$ index.php?page=picturi&filtru=subiecte-detaliate&tip=peisaj-urban&ga...
by dotphp
Fri Jun 15, 2012 1:49 pm
Forum: Linux
Topic: friendly links
Replies: 8
Views: 28636

Re: friendly links

RewriteEngine on RewriteRule ^sitemap/.*$ - [PT] RewriteRule ^administrator/.*$ - [PT] RewriteRule ^temp/.*$ - [PT] ErrorDocument 404 /http://www.picturi-celebre.ro RewriteRule ^picturi~(.+)~(.+)~([0-9]+)$ index.php?page=picturi&filtru=$1&tip=$2&gal=$3 [QSA,L] RewriteRule ^(.+)-([0-9]+)$...
by dotphp
Fri Jun 15, 2012 8:24 am
Forum: Linux
Topic: friendly links
Replies: 8
Views: 28636

Re: friendly links

I get it, it's ok. But now I have: RewriteRule ^(.+)-([0-9]+)$ index.php?page=tablouri_det&title=$1&id_tab=$2 [QSA,L] RewriteRule ^(.+)-([0-9]+)$ index.php?page=tablouri&title=$1&id_tab=$2 [QSA,L] And the link is: <a href="title-'.$id.'" >. Obviously is not working because ...
by dotphp
Fri Jun 15, 2012 2:46 am
Forum: Linux
Topic: friendly links
Replies: 8
Views: 28636

Re: friendly links

It does, but only if I set the link like: <a href="tablouri_det/title-'.$id.'" > I want to set the link like: <a href="title-'.$id.'" > . If I use in this way with the code for htaccess sent by tr0gd0rr, it doesn't work. Somehow I need to hide the page from the link.
by dotphp
Thu Jun 14, 2012 2:43 pm
Forum: Linux
Topic: friendly links
Replies: 8
Views: 28636

Re: friendly links

Thanks, but I need to complete htaccess for this kind of link:
<a href="title-something-1234">blabla</a>
by dotphp
Thu Jun 14, 2012 7:30 am
Forum: Linux
Topic: friendly links
Replies: 8
Views: 28636

friendly links

Hello, I have link in my site like: <a href="index.php?page=article&title=title-something&id=1234">blabla</a> I want to use in my site friendly links like: <a href="title-something-1234">blabla</a> Where "title-something" is a title from an article and "123...
by dotphp
Thu Jun 07, 2012 8:30 am
Forum: PHP - Code
Topic: resize image + white background
Replies: 4
Views: 3343

Re: resize image + white background

Solved. function resize_image($max_width,$max_height){ $width = $this->getWidth($this->image_location); $height = $this->getHeight($this->image_location); $new_width = ""; $new_height = ""; $with_scale = $width/$max_width; $height_scale = $height/$max_height; if($with_scale > $he...
by dotphp
Wed Jun 06, 2012 1:22 pm
Forum: PHP - Code
Topic: resize image + white background
Replies: 4
Views: 3343

Re: resize image + white background

I believe that I need a white picture with 200x200, and over to put the new 200x120 and save as one picture.
How can I do that in code ?
by dotphp
Wed Jun 06, 2012 6:42 am
Forum: PHP - Code
Topic: resize image + white background
Replies: 4
Views: 3343

resize image + white background

I have a php function that resize an image: function resize_image($max_width,$max_height){ $width = $this->getWidth($this->image_location); $height = $this->getHeight($this->image_location); $new_width = ""; $new_height = ""; $with_scale = $width/$max_width; $height_scale = $heig...
by dotphp
Thu Nov 03, 2011 3:28 am
Forum: PHP - Code
Topic: hide id with mod_rewrite
Replies: 5
Views: 3271

Re: hide id with mod_rewrite

If I fetch in databases using 'article-title' instead the id it will take longer to search for it ?
I know that if you search by id is much faster than text.
by dotphp
Wed Nov 02, 2011 7:29 am
Forum: PHP - Code
Topic: hide id with mod_rewrite
Replies: 5
Views: 3271

hide id with mod_rewrite

Hi.

I have a link like this:
index.php?page=article-title&id=12

article-title and id are dynamical

How can I show in my address bar only: http://www.website.com/article-title/
not http://www.website.com/article-title/12/

What I must change in htaccess for this.

Thanks
by dotphp
Wed Nov 02, 2011 7:27 am
Forum: Linux
Topic: hide id with mod_rewrite
Replies: 1
Views: 4868

hide id with mod_rewrite

Hi.

I have a link like this:
index.php?page=article-title&id=12

article-title and id are dynamical

How can I show in my address bar only: http://www.website.com/article-title/
not http://www.website.com/article-title/12/

What I must change in htaccess for this.

Thanks
by dotphp
Sat Oct 29, 2011 6:08 am
Forum: PHP - Code
Topic: loading icon
Replies: 1
Views: 207

loading icon

Hi

I have website where users can upload pictures on server. Sometimes it take 4-5 seconds until the upload it's finish.
What can I do that when I click on upload button an icon appear in middle of the screen and disappear then the pictures was finish uploading.

Thanks