Jump to content

dianikol85

Member
  • Posts

    123
  • Joined

  • Last visited

Posts posted by dianikol85

  1. i tried fto build an e-shopstore with osCommerse for learning purposes. I spent 2 days to understand how to make changes to look better since it uses classes. But is is a little bit messy coded. It is full featerd e-xommerse also i think it's old stuff. Post back your solution if you want!!

  2. Hi to all, I am trying to build from scratch an image cross fade slideshow but i stack ...

     

    here is my html code

     

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html>
    <head>
    	<title></title>
    	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    	<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
    	<script type="text/javascript" src="gallery.js"></script>
    	<style type="text/css">
    		#wrapper {
    			width: 800px;
    			height: 600px;
    			margin: 0 auto;
    			position: relative;
    		}
    
    		#wrapper .images{
    			position: absolute  
    		}
    	</style>
    </head>
    <body>
    	<div id="wrapper">
    		<div class="images" style="width:600px; height:400px;">
    			<img src="image1.jpg" />
    		</div>
    
    		<div class="images" style="width:600px; height:400px;">
    			<img src="image2.jpg" />
    		</div>
    
    		<div class="images" style="width:600px; height:400px;">
    			<img src="image3.jpg" />
    		</div>
    	</div>
    </body>
    </html>
    

     

     

    and here my jquery code gallery.js

     

    $(document).ready(function() {
    var counter = $("#wrapper div.images").length;
    $("#wrapper .images:first").addClass('first');
    $("#wrapper .images:last").addClass('last');
    $("#wrapper .images:not(:first)").hide();
    
    cur = $("#wrapper .images:first");
    
    setInterval('Forward()',3000);
    
    });
    
    function Forward()
    {
    cur.fadeOut( 700 );
    if ( cur.hasClass('class') == "last" )
    	cur = $("#wrapper .images:first");
    else
    	cur = cur.next();
    cur.fadeIn( 700 );
    }
    
    

     

    i add in the first div a class named "first" and in the last one a class named "last". So I check if the current div has a class "last" ake the cur variable point to the div with the class "first" in order to succed the slideshow effect. I will add buttos and stuff later...

     

    I use the .hasClass() jquery function ofcourse to check the current class but it seems something is wrong,

     

    Any advices??

     

    Thanks nurds :D

  3. - ID should be generated automatically by the database's "autonumber" field. You shouldn't need a counter for that. You only need ID's when updating a row.

     

    - Don't forget to attach a random string as a querystring to your AJAX url so the browser doesn't cache the result, and returns "Success" everytime even if there was an error. Also good practice to "Disable" any buttons during the AJAX submission to prevent any double-entries.

     

    - Think it would be nice to update the current table with newly added records once they've been inputted. Maybe another AJAX page that returns all records as "<table>" in html format, or just an array/json can do the job as well.

     

     

    1) I use the counter just to have an order to the table. No other reason.

     

    2)Disabling the buttons during Ajax is a nice one. ;)

     

    3) All the insertions are instantly. So it feels like awindows app.

  4. Hi to all. I want your opinion about a jquery practice

     

    So here is the thing

     

    I have a database and one table lets call it test_table and it has three fields : id, lastName, firstName.

     

    In the index.php ilets say we create a table

     

    | id | First Name | Last name | +/-

     

    and three button:

    1) Add new row

    2) Save the row

    3) Update the row

     

    So far so good. When i click the "Add new row" button via jquery we create a new row at the end of the table with 4 fields which contain a counter for the Id, two text inputs for the names and the last one contans two buttons the "Save the row" and

    the "Update the row". When the rows has been added i hide the "Update the row" button. So i fill the text inputs with data and then i click "Save the row" and with ajax i insert the data in the database. so when the insert action has completed i hide th e "Save the row" button and show the "Update the row" button. In order to do the update for this particular row when i did the insert i echo back the max id of the table and save it in a hidden input somewhere in the added row so i can access it with $(this).

     

    This process can be repeated for every new row when i click the Add button.

     

     

    What do you think about this technique. Do you suggest something more efficient than that? i would be very happy if you have a better solution although mine works very well i think.

     

     

    Thank you in advance and looking forward for your replies :blink::D

  5. Oh dont worry guys. It was just an example just to show things that cms like wordpress can't do. I guess nobody risk a web site like that without being well known of the framework that is going to be use. I am a starter so i'll do simple things until i get better...

  6. I can't really compare CodeIgniter with CakePHP. However, I found CodeIgniter quite easy to get started with, logically laid out, and the online documentation is excellent. Besides, I know CI not Cake, and I'm not sure anyone here has that much experience with CakePHP. ;)

     

    hehe thanks a lot!!!!!!!

  7. i see, anyway i wanted to learn some framework, i am between cakePHP and CodeIgniter. i read that cakePHP have a lot of ready functionality but it hides you how the things work while CodeIgniter gives you this knowledge. I guess that depends on me, Anyway do you have any good video tuts of CodeIgniter to suggest me? i am a beginning with framewoks

  8. then let's say there aren't out there something for handle hotels. (i 'll use the same example) So i have to do something by myself. So a php framework (CakePHP, CodeIgniter, etc) is the next step to build my own cms-like for this particular project using its ready fuctionality. Otherwise i can't do much to get the web app done i guess.

  9. hi to all!!

     

    So, this is my question. I use wordpress as cms for my web projects. so far so good, no problem at all!! But apparently we cant do all the kind of sites with wordpress. For example, let's say we want to buld a site about hotel booκing room (online of course) and what hotels are near by to choose from. In other words, a web site that advertise hotels using images etc and room booking system.So I do need a database and an administrator tool to manage hotels and what rooms are available in which hotel and stuff like that.

     

    What's your opinion about that and what do you suggest someone to do in a situation like this one. Do i need to use cakePHP or zend framework for example?

     

     

     

    Thank you in advance.

  10. i believe that it is a wordpress error. i just did the very basic just to add a link to settings section in wp-admin. The steps i did are the following:

     

    1) in wp-content/plugins i created a new folder called myPlugin

     

    2) then in that folder i create the myPlugin.php file and within it the appropriate infos in order wordpress see this as a plugin . I copied that info so these are ok

     

    then i add this piece of code

     

    function myFunc() {

    add_options_page("my plugin", "my plugin", 1, "my plugin", "myFunc");

    }

     

    add_action('admin_menu', 'myFunc');

     

    so under Settings i have a link called "my plugin" as excpected . So i click on this link and here it is .the error appears

  11. hi to all, this may be silly but i can't solve it. Here's the thing:

     

    i just create a simple plugin and i put an

    # to the settings via this add_action() and it adds my li in the settings after i activated the plugin. when i clicked my plugins setings i get the following error message

     

    You do not have sufficient permissions to access this page.

     

    what should i do??

     

    thank you in advance

×
×
  • Create New...