How to develop our own advanced php web application

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • roccos
    New Member
    • Feb 2009
    • 12

    How to develop our own advanced php web application

    Hi Guys,

    I have developed a php based simple web application which allows users to view articles, comment on articles ,etc

    The features of the application are:

    Member Features:

    • Allows members to create categories
    • Allows members to retrieve lost passwords
    • Allows members to post new articles, comment on articles

    Admin Features:

    • Allows admin to create/edit/delete users.
    • Allows admin to post/suspend articles, comments.
    • And almost everything can be done by admin

    User Features:

    • Allows users to view articles, comment on articles, sign up for website, etc

    PLEASE HELP ME OUT IN ADDING THESE FEATURES TO MY WEB APPLICATION:

    1. Whenever an article is viewed the url of the article becomes http://www.demo.com/article.php?id=123

    I want the function which allows admin to change the url of any article, like


    2. I want to provide the users/member/designers the ability to design template for the application i…e In short I want the application to be template driven.

    3. I want to provide users with the ability to create custom plugins for the application so that the application can be extended very easily.

    (For now this is all I need but in future I will need more features)

    PLEASE HELP ME………………….. I would be very thankful to you all
  • Markus
    Recognized Expert Expert
    • Jun 2007
    • 6092

    #2
    I want never gets.
    1. Pretty URLs. - Of course, you'll have to have your application generate the .htaccess file.
    2. I don't understand.
    3. Interesting discussion on making a pluggable application.


    Remember, we will never give you full sourcecode. We expect you to do the work, and when you hit a specific problem, ask for help.

    Comment

    • roccos
      New Member
      • Feb 2009
      • 12

      #3
      Thanks for the info...

      Sorry for i want, but this will be very helpful to others as well

      can you at least tell a way using which application can be made template driven
      or can you refer some books.........

      Thanks for the info.

      Comment

      • Markus
        Recognized Expert Expert
        • Jun 2007
        • 6092

        #4
        Originally posted by roccos
        Sorry for i want, but this will be very helpful to others as well
        Of course, but saying 'I want, I want' is a very rude way of asking for help.

        Any how, I've not delved into template driven applications, but a quick google offered a promising result.

        Comment

        • roccos
          New Member
          • Feb 2009
          • 12

          #5
          Thanks for your Great Help, more questions coming very soooooon. :)

          Comment

          • Markus
            Recognized Expert Expert
            • Jun 2007
            • 6092

            #6
            Originally posted by roccos
            Thanks for your Great Help, more questions coming very soooooon. :)
            No problem. We shall be waiting. :)

            Comment

            • roccos
              New Member
              • Feb 2009
              • 12

              #7
              Well then here's a question for you:
              how to create a search engine which displays results from google, amazon and eBay....., I have experience in creating database driven search engines

              And one more questions about Pretty URL's, though the link to articles you provided is useful, But i didn't understand it clearly.... Can you explain or provide links to Articles which explain "Pretty URL's" in a great detail (i..e step 1 to the last step)

              Comment

              • Markus
                Recognized Expert Expert
                • Jun 2007
                • 6092

                #8
                Originally posted by roccos
                Well then here's a question for you:
                how to create a search engine which displays results from google, amazon and eBay....., I have experience in creating database driven search engines

                And one more questions about Pretty URL's, though the link to articles you provided is useful, But i didn't understand it clearly.... Can you explain or provide links to Articles which explain "Pretty URL's" in a great detail (i..e step 1 to the last step)
                1. That's a question for a new thread.

                2. Google's results. After looking through a few tutorials, you'll start to understand, and when you have a more *specific* question, post back.

                Comment

                • roccos
                  New Member
                  • Feb 2009
                  • 12

                  #9
                  what will be the .htaccess code to acheive this?

                  Hi guys,

                  I tried learning and implementing .htaccess code but i always get an error,
                  so can you provide .htaccess code to acheive this:

                  1. whenever a page i viewed the url becomes

                  Want this to be changed to


                  Similarly for categories, when a category is viewed the url becomes

                  want this to be changed to


                  Help Me Out Guys......

                  Comment

                  • Markus
                    Recognized Expert Expert
                    • Jun 2007
                    • 6092

                    #10
                    Can you provide the code you have tried? (We don't give out code without any effort on your part to at least try).

                    Comment

                    • roccos
                      New Member
                      • Feb 2009
                      • 12

                      #11
                      This Is The Code:

                      Options -MultiViews +FollowSymlinks -Indexes

                      <IfModule mod_security.c>
                      SecFilterEngine Off

                      SecFilterScanPO ST Off
                      </IfModule>

                      <IfModule mod_rewrite.c>
                      RewriteEngine On



                      RewriteCond %{REQUEST_FILEN AME} !-f
                      RewriteCond %{REQUEST_FILEN AME} !-d
                      RewriteRule . index.php
                      </IfModule>

                      I tried changing index.php with page.php but nothing happened, All it displays is a navigation bar with footer contents without any styles (i..e No CSS)


                      Over To You Markus ............... ......

                      Comment

                      • roccos
                        New Member
                        • Feb 2009
                        • 12

                        #12
                        GUYS, WHAT HAPPENED, WHY NO REPLY.......... .

                        I NEED HELP, Do let me know if you cant

                        Comment

                        • devsusen
                          New Member
                          • Feb 2007
                          • 136

                          #13
                          Originally posted by roccos
                          Hi guys,

                          I tried learning and implementing .htaccess code but i always get an error,
                          so can you provide .htaccess code to acheive this:

                          1. whenever a page i viewed the url becomes

                          Want this to be changed to


                          Similarly for categories, when a category is viewed the url becomes

                          want this to be changed to


                          Help Me Out Guys......
                          I hope this may help you
                          Code:
                          RewriteEngine on
                          
                          RewriteRule ^archive.html archive.php [L]
                          RewriteRule ^([A-Za-z0-9_\-]+)\.html$ index.php?u=$1 [L]
                          This code written in HTACESS file can do the following :

                          To

                          Comment

                          • Markus
                            Recognized Expert Expert
                            • Jun 2007
                            • 6092

                            #14
                            Here is an example: read the url http ://example.com/my_dir/test.php?id=1 as http ://example.com/my_dir/id/1.

                            Code:
                            # Turn on the engine. Brum brum.
                            RewriteEngine On
                            # Set the current directory - this time it is 'my_dir'
                            RewriteBase /my_dir/
                            # Conditionals - only run the rewrite if we're getting a none-existant file...
                            RewriteCond %{REQUEST_FILENAME} !-f
                            # Or directory.
                            RewriteCond %{REQUEST_FILENAME} !-d
                            # The rewrite rule.
                            RewriteRule ^([a-zA-Z]+)/([0-9])$ test.php?$1=$2 [R]
                            The rule's explanation:
                            • We start the rule with a ^ character;
                            • Then we use parenthesis '( )' to indicate we want the expressions results to be stored in a variable for later use;
                            • The expression checks for any alpha character (lowercase and uppercase) - the + sign let's us check for multiple characters;
                            • The forward slash that would appear in the url to separate the items;
                            • Then we do the same as the above, this time checking for only numeric characters 0 through 9;
                            • $ terminates the rule.


                            The last part tells us where to redirect to, using $ (followed by the rules placement - $1 = [a-zA-Z0-9] ) to place the variables into the location we want them.

                            Finally, the [R] flag forces the browser to redirect to the new url. If you just wanted to mask the url, simply change the flag to [L] (last rule) or ommit the flag.

                            I hope this helps.

                            ps: less bold and less uppercaps, please.

                            Comment

                            • roccos
                              New Member
                              • Feb 2009
                              • 12

                              #15
                              Thanks Guys, Really thank you for your help.., Though i haven't tried the code yet, I'll try it very soon and i really hope it works..

                              Comment

                              Working...