SitePoint Sponsor

User Tag List

Page 26 of 31 FirstFirst ... 16222324252627282930 ... LastLast
Results 626 to 650 of 767
  1. #626
    SitePoint Member
    Join Date
    Jun 2008
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI

    It s great great post a new starter like me

    very nicely tutorial ...


    Thanks

  2. #627
    SitePoint Member
    Join Date
    May 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I need to create a next and previous buttons to navigate through the images...how do I do this?

  3. #628
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    You will need to count how many images there are. If they are listed in a database as details, then this would be much easier to do.

    I have just writen some code for pagination which may help you out. Also, do a search in SPF for pagination under the PHP section.

  4. #629
    SitePoint Member
    Join Date
    Feb 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Spence, thank for all the extra work youve put it

    I was readin a few pages back and it looked like you had category descriptions implemented.

    Is there any chance you can show me how, ive attempted and seem to be failing miserably.

  5. #630
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by tworak View Post
    Hi Spence, thank for all the extra work youve put it

    I was readin a few pages back and it looked like you had category descriptions implemented.

    Is there any chance you can show me how, ive attempted and seem to be failing miserably.
    Thank you tworak

    What code would you like? The list of main categories? Or the code for all the sub categories with the chosen main category?

  6. #631
    SitePoint Member
    Join Date
    May 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i used the method described in this article to create the gallery so that is the structure I have right now...plus can you let me see your pagination script?

  7. #632
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    My pagination script is in it's early days yet and would like to test it out a bit more, but yea it's not too hard to do.

    PHP Code:
    <?php
    $max_results 
    '20';
    if(!isset(
    $_GET['page'])){
        
    $page 1;
    }else{
        
    $page = (int)($_GET['page']);
    }
    $from = (($page $max_results) - $max_results);
    $data mysql_query("SELECT this, that FROM table ORDER BY id DESC LIMIT $from$max_results");

    if(
    mysql_num_rows($data) == 0)    {
        echo 
    'Sorry, nothing found';
    }else{
        echo 
    'What ever you like here';
        }
        
    mysql_free_result$data);

        
    $count mysql_result(mysql_query("SELECT COUNT(*) as Num FROM table ORDER BY id DESC"),0);
        
        
    $total_pages ceil($count $max_results);

        if(
    $count $max_results){
            echo 
    'Page 1 of 1';
        }else{
            echo 
    'Page '.$page.' of '.$total_pages;
            for(
    $i 1$i <= $total_pages$i++) {
                if(
    $i <= 7) {
                    if(
    $page $i) {
                    echo 
    '<a href="'.$_SERVER['PHP_SELF'].'?page='.($page-1).'">&laquo; Prev</a>';
                    }
                    echo 
    '<a href="'.$_SERVER['PHP_SELF'].'?page='.$i.'">'.$i.'</a>';
                }
                if(
    $i >= 8) {
                echo 
    '<a href="'.$_SERVER['PHP_SELF'].'?page='.$total_pages.'">Last</a>';
                }
                if(
    $page $i) {
                echo 
    '<a href="'.$_SERVER['PHP_SELF'].'?page='.($page+1).'">Next &raquo;</a>';
                }
            }
        }
    }
    ?>
    Sorry have not included the css bits. If you would like them too I can post them.

    I hope you can understand the above code, I've not added any comments which is not like me at all.

  8. #633
    SitePoint Member
    Join Date
    Feb 2008
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spence_noodle View Post
    Thank you tworak

    What code would you like? The list of main categories? Or the code for all the sub categories with the chosen main category?
    Hi,

    i couldnt even find the module itself that was mentioned a while back. that seemed to cover sup cats and category description.

    Mostly im looking for the category description setup, id love to be abe to add a description to each cat.

    cheers

  9. #634
    SitePoint Member
    Join Date
    May 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    HI, I used the tutorial and a few tweaks from the forum to build my gallery...feel free to check it out and give comments here. thank you.

    The address is www dot ilovehiplife dot com

  10. #635
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb

    Hey all, this looks pretty cool and I'm going to get started - but I was wondering if anyone has thought of/developed code for an image moderation tool. I was looking for something similar to how the wordpress comment mod works. Example:

    1) User uses your web based upload page to submit a photo
    2) you are alerted via email that a user has submitted a photo and it awaits moderation
    3) you log on to the moderation page and see the image(s) awaiting moderation
    4) you click approve or yes
    5) the photo is automatically posted/ingested into the db and posted on your site
    OR - you click no, and the photo is deleted.

    Any thoughts?

    Thanks,
    Adam

  11. #636
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    Hi Adam

    That seems pretty straight forward really.

    1) User uses your web based upload page to submit a photo

    So using the basic upload form, upload to a 'temp' image folder.

    2) you are alerted via email that a user has submitted a photo and it awaits moderation
    when the file is uploaded, use mail() to notify the admin that an image has been added. Possibly also add to a 'holding' database table.

    3) you log on to the moderation page and see the image(s) awaiting moderation
    simple user authentication and list from the temp directory/ table

    4) you click approve or yes
    either a link or checkbox like hotmail - ticked get deleted or approved .

    Is this something you are wanting Adam or something you are thinking about developing?
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  12. #637
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ View Post
    Hi Adam

    That seems pretty straight forward really.

    1) User uses your web based upload page to submit a photo

    So using the basic upload form, upload to a 'temp' image folder.

    2) you are alerted via email that a user has submitted a photo and it awaits moderation
    when the file is uploaded, use mail() to notify the admin that an image has been added. Possibly also add to a 'holding' database table.

    3) you log on to the moderation page and see the image(s) awaiting moderation
    simple user authentication and list from the temp directory/ table

    4) you click approve or yes
    either a link or checkbox like hotmail - ticked get deleted or approved .

    Is this something you are wanting Adam or something you are thinking about developing?
    More of a want due to time constraints. I could probably figure out how to code/develop it, but was looking for more of a prebuilt alternative that I could then customize on my own- basically a raw example/something to start from.

    Thanks for the tips too.

  13. #638
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    I cant think of any prebuilt gallery systems like that off the top of my head. If I get chance tonight I will see if I can get something tooled up that will give you the bare bones.

    Welcome to the forums btw
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  14. #639
    SitePoint Member
    Join Date
    Jul 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hey spikeZ,

    Thanks! This certainly is a warm welcome! I appreciate the help and your time!

    Adam

  15. #640
    SitePoint Member
    Join Date
    Aug 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I loved the article.. thank you very much for sharing...

  16. #641
    SitePoint Member
    Join Date
    Jan 2006
    Location
    Los Angeles, CA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nice tutorial!

    I managed to build a pagination script for my thumbnail views, but how do I do it for the full view page? I would like to let the user click "previous" or "next" to quickly look through the photos!

    Any suggestions?

    //Veronica

  17. #642
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    Hi Veronica,

    I havent looked through the entire script but perhaps if you used the ID of the current photograph and when you display it, query the database and look for the next id that is greater than the current one.
    (that sounded so much better in my head....)
    eg
    PHP Code:
    if(isset($_GET['next'])){
      
    $sql "select id from yourTable where id>'$id' order by id limit 1";
      
    $res mysql_query($sql) or die ("Error in query: " mysql_error());
      if(
    $inf mysql_fetch_array($res)){ // A next record is found
          
    $id$inf["id"]; // Set $id to the next ID
      
    }

    where $id is the current id of the picture..
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  18. #643
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    easy, you do the same but instead use one picture to show and below have the buttons going to the previous and next picture.

    Example:

    Picture displayed has an id of '2'

    Have the previous button pointing to id '1' and the next button pointing to '3'. Just have the previous button minus the id and the next button plus one.

  19. #644
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    what happens if you delete one......
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  20. #645
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Yep, thats true...

    It was just an example which he could work on. I should have said this in the first place.

  21. #646
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,804
    Mentioned
    157 Post(s)
    Tagged
    3 Thread(s)
    lol, I know thats what you meant - good to have you back btw
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  22. #647
    SitePoint Wizard spence_noodle's Avatar
    Join Date
    Jan 2004
    Location
    uk, Leeds (area)
    Posts
    1,264
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Hi

    I've been busy building a website *cough sig

  23. #648
    SitePoint Member
    Join Date
    Jan 2006
    Location
    Los Angeles, CA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I understand how to paginate when you loop through all the results, say for the thumbnails in this script. But how do you do for the full view images? You don't loop through the results in that case. Any hints?

  24. #649
    SitePoint Member
    Join Date
    Jan 2006
    Location
    Los Angeles, CA
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by spikeZ View Post
    Hi Veronica,

    I havent looked through the entire script but perhaps if you used the ID of the current photograph and when you display it, query the database and look for the next id that is greater than the current one.
    (that sounded so much better in my head....)
    eg
    PHP Code:
    if(isset($_GET['next'])){
      
    $sql "select id from yourTable where id>'$id' order by id limit 1";
      
    $res mysql_query($sql) or die ("Error in query: " mysql_error());
      if(
    $inf mysql_fetch_array($res)){ // A next record is found
          
    $id$inf["id"]; // Set $id to the next ID
      
    }

    where $id is the current id of the picture..
    Ok! I understand that part. In this case, I have an array of pictures, for example; say they have the following id's: 3, 4, 5, 8, 10. I know which id I am looking at, so how do I get the whole sequence of id's and the order they are in? I guess I need that to make my pagination links in this case.

    Thanks again!

  25. #650
    SitePoint Member
    Join Date
    May 2008
    Posts
    12
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check out my site...ilovehiplifedotcom I dunno if that's what you are after veronica! It's pretty cool. Am working on making the thumbnail appear on the same page as the main picture so that when you click on a thumbnail it loads in the main picture


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •