~quam-plures-core/quam-plures/multiple_user_adsense

« back to all changes in this revision

Viewing changes to qp_install/_functions_create.php

  • Committer: EdB
  • Date: 2013-02-25 05:03:58 UTC
  • mfrom: (7618.1.37 quam-plures)
  • Revision ID: 1912webworks@gmail.com-20130225050358-v7ogz34ydcvohkq6
updating to current core

Show diffs side-by-side

added added

removed removed

Lines of Context:
528
528
        $cat_linkblog_b2evo = cat_create( $app_name, 'NULL', $blog_linkblog_ID );
529
529
        $cat_linkblog_contrib = cat_create( 'Contributors', 'NULL', $blog_linkblog_ID );
530
530
        // Create categories for photoblog
531
 
        $cat_photo_album = cat_create( 'Owen Michael', 'NULL', $blog_photoblog_ID );
 
531
        $cat_yellowstone = cat_create( 'Yellowstone', 'NULL', $blog_photoblog_ID );
532
532
        task_end();
533
533
 
534
534
        echo T_('Creating sample posts and comments').' ... ';
591
591
        // Insert a post into blog #4:
592
592
        $now = date('Y-m-d H:i:s',installer_timestamp());
593
593
        $edited_Item = new Item();
594
 
        $edited_Item->insert( 1, T_('Owen'), '',
595
 
                $now, $cat_photo_album, array(), 'published','en-US' );
596
 
 
597
 
        // attach an image to the item
598
 
        $edit_File = new File( 'user', 1, 'samplephoto1.jpg' );
599
 
        $edit_File->link_to_Item( $edited_Item );
600
 
        // add meta data for this image (only once per image!)
601
 
        $query = "UPDATE T_files
602
 
                SET file_title = 'May 30, 2009', file_alt = 'May 30, 2009', file_desc = 'Just learning to sit at almost four months.'
603
 
                WHERE file_ID = {$edit_File->ID}";
604
 
        $DB->query( $query );
605
 
 
606
 
 
607
 
        // Insert a post into blog #4:
608
 
        $now = date('Y-m-d H:i:s',installer_timestamp());
609
 
        $edited_Item = new Item();
610
 
        $edited_Item->insert( 1, T_('Owen'), 'This photo has some text like a normal blog post might.',
611
 
                $now, $cat_photo_album, array(), 'published','en-US' );
612
 
 
613
 
        // attach an image to the item
614
 
        $edit_File = new File( 'user', 1, 'samplephoto2.jpg' );
615
 
        $edit_File->link_to_Item( $edited_Item );
616
 
        // add meta data for this image (only once per image!)
617
 
        $query = "UPDATE T_files
618
 
                SET file_title = 'September 3, 2009', file_alt = 'September 3, 2009', file_desc = 'Seven months old in new jammies.'
619
 
                WHERE file_ID = {$edit_File->ID}";
620
 
        $DB->query( $query );
621
 
 
622
 
 
623
 
        // Insert a post into blog #4:
624
 
        $now = date('Y-m-d H:i:s',installer_timestamp());
625
 
        $edited_Item = new Item();
626
 
        $edited_Item->insert( 1, T_('October 18, 2010'), 'This post simulates providing a "title" when uploading the image then immediately making a post directly from file manager.  The "title" of the image became the title of the post.  (This text would have been added by editing the post after automatically creating it.)',
627
 
                $now, $cat_photo_album, array(), 'published','en-US' );
628
 
 
629
 
        // attach an image to the item
630
 
        $edit_File = new File( 'user', 1, 'samplephoto3.jpg' );
631
 
        $edit_File->link_to_Item( $edited_Item );
632
 
        // add meta data for this image (only once per image!)
633
 
        $query = "UPDATE T_files
634
 
                SET file_title = 'October 18, 2010', file_alt = 'October 18, 2010', file_desc = 'First Halloween costume--our little chicken.'
635
 
                WHERE file_ID = {$edit_File->ID}";
636
 
        $DB->query( $query );
637
 
 
638
 
 
639
 
        // Insert a post into blog #4:
640
 
        $now = date('Y-m-d H:i:s',installer_timestamp());
641
 
        $edited_Item = new Item();
642
 
        $edited_Item->insert( 1, T_('2 pics in one post'), 'This post shows how you can attach more than one image to a post. By the way all Owen pics courtesy of <a href="http://www.hudson2001.com/blogs/" title="A daily diary of the mostly mundane, sometimes surprising, and often opinionated">his Mom, Jen</a> :)',
643
 
                $now, $cat_photo_album, array(), 'published','en-US' );
644
 
 
645
 
        // attach an image to the item
646
 
        $edit_File = new File( 'user', 1, 'samplephoto4.jpg' );
647
 
        $edit_File->link_to_Item( $edited_Item );
648
 
        // add meta data for this image (only once per image!)
649
 
        $query = "UPDATE T_files
650
 
                SET file_title = 'January 14, 2010', file_alt = 'January 14, 2010', file_desc = 'My favorite picture ever (11.5 months).'
 
594
        $edited_Item->insert( 1, T_('artists-paint-pots-2'), 'This shows the simplest attachment possible: the file name became the file\'s title, alt text, description, and post title.', 
 
595
                $now, $cat_yellowstone, array(), 'published','en-US' );
 
596
        // attach an image to the item
 
597
        $edit_File = new File( 'collection', 4, 'artists-paint-pots-2.jpg' );
 
598
        $edit_File->link_to_Item( $edited_Item );
 
599
        // add meta data for this image (only once per image!)
 
600
        $query = "UPDATE T_files 
 
601
                SET file_title = 'artists-paint-pots-2', file_alt = 'artists-paint-pots-2', file_desc = 'artists-paint-pots-2' 
 
602
                WHERE file_ID = {$edit_File->ID}";
 
603
        $DB->query( $query );
 
604
 
 
605
        // Insert a post into blog #4:
 
606
        $now = date('Y-m-d H:i:s',installer_timestamp());
 
607
        $edited_Item = new Item();
 
608
        $edited_Item->insert( 1, T_('Photo of Biscuit Basin'), 'This shows a customized "file title" field, which became the alt text and description and item title.', 
 
609
                $now, $cat_yellowstone, array(), 'published','en-US' );
 
610
        // attach an image to the item
 
611
        $edit_File = new File( 'collection', 4, 'biscuit-basin.jpg' );
 
612
        $edit_File->link_to_Item( $edited_Item );
 
613
        // add meta data for this image (only once per image!)
 
614
        $query = "UPDATE T_files 
 
615
                SET file_title = 'Photo of Biscuit Basin', file_alt = 'Photo of Biscuit Basin', file_desc = 'Photo of Biscuit Basin' 
 
616
                WHERE file_ID = {$edit_File->ID}";
 
617
        $DB->query( $query );
 
618
 
 
619
        // Insert a post into blog #4:
 
620
        $now = date('Y-m-d H:i:s',installer_timestamp());
 
621
        $edited_Item = new Item();
 
622
        $edited_Item->insert( 1, T_('Emerald Pool, Yellowstone NP'), 'This image has all three attributes set to unique values, then this post was created with a unique title and content, then the image was attached to the post.', 
 
623
                $now, $cat_yellowstone, array(), 'published','en-US' );
 
624
        // attach an image to the item
 
625
        $edit_File = new File( 'collection', 4, 'emerald-pool-in-yellowstone.jpg' );
 
626
        $edit_File->link_to_Item( $edited_Item );
 
627
        // add meta data for this image (only once per image!)
 
628
        $query = "UPDATE T_files 
 
629
                SET file_title = 'Emerald Pool, Yellowstone', file_alt = 'Photo of Emerald Pool in Yellowstone', file_desc = 'This is the \"description/caption\" field for the file name \"emerald-pool-in-yellowstone.jpg\"' 
 
630
                WHERE file_ID = {$edit_File->ID}";
 
631
        $DB->query( $query );
 
632
 
 
633
        // Insert a post into blog #4:
 
634
        $now = date( 'Y-m-d H:i:s', installer_timestamp() );
 
635
        $edited_Item = new Item();
 
636
        $edited_Item->insert( 1, T_('Mammoth Hot Springs'), '', 
 
637
                $now, $cat_yellowstone, array(), 'published','en-US' );
 
638
        // attach an image to the item
 
639
        $edit_File = new File( 'collection', 4, 'mammoth-hot-springs.jpg' );
 
640
        $edit_File->link_to_Item( $edited_Item );
 
641
        // add meta data for this image (only once per image!)
 
642
        $query = "UPDATE T_files 
 
643
                SET file_title = 'Mammoth Hot Springs', file_alt = 'Mammoth Hot Springs', file_desc = 'Free Stock Photo of Mammoth Hot Springs - Yellowstone - Travel, from public-domain-photos.com' 
 
644
                WHERE file_ID = {$edit_File->ID}";
 
645
        $DB->query( $query );
 
646
 
 
647
        // Insert a post into blog #4:
 
648
        $now = date( 'Y-m-d H:i:s', installer_timestamp() );
 
649
        $edited_Item = new Item();
 
650
        $edited_Item->insert( 1, T_('Morning Glory Pool'), 'This photo has some text like a normal blog post might.', 
 
651
                $now, $cat_yellowstone, array(), 'published','en-US' );
 
652
        // attach an image to the item
 
653
        $edit_File = new File( 'collection', 4, 'morning-glory-pool.jpg' );
 
654
        $edit_File->link_to_Item( $edited_Item );
 
655
        // add meta data for this image (only once per image!)
 
656
        $query = "UPDATE T_files 
 
657
                SET file_title = 'Morning Glory Pool', file_alt = 'Morning Glory Pool', file_desc = 'Free Stock Photo of Morning Glory Pool - Yellowstone - Travel, from public-domain-photos.com' 
 
658
                WHERE file_ID = {$edit_File->ID}";
 
659
        $DB->query( $query );
 
660
 
 
661
        // Insert a post into blog #4:
 
662
        $now = date('Y-m-d H:i:s',installer_timestamp());
 
663
        $edited_Item = new Item();
 
664
        $edited_Item->insert( 1, T_('2 pics in one post'), 'This post shows how you can attach more than one image to a post. All of the Yellowstone photos came from <a href="http://www.public-domain-photos.com/travel/yellowstone">Public-Domain-Photos</a>.', $now, $cat_yellowstone, array(), 'published','en-US' );
 
665
        // attach an image to the item
 
666
        $edit_File = new File( 'collection', 4, 'mammoth-hot-springs.jpg' );
 
667
        $edit_File->link_to_Item( $edited_Item );
 
668
        // add meta data for this image (only once per image!)
 
669
        $query = "UPDATE T_files 
 
670
                SET file_title = 'Mammoth Hot Springs', file_alt = 'Mammoth Hot Springs', file_desc = 'Mammoth Hot Springs.' 
651
671
                WHERE file_ID = {$edit_File->ID}";
652
672
        $DB->query( $query );
653
673
        // attach another image to the item
654
 
        $edit_File = new File( 'user', 1, 'samplephoto5.jpg' );
 
674
        $edit_File = new File( 'collection', 4, 'morning-glory-pool.jpg' );
655
675
        $edit_File->link_to_Item( $edited_Item );
656
676
        // add meta data for this image (only once per image!)
657
 
        $query = "UPDATE T_files
658
 
                SET file_title = 'July 10, 2010', file_alt = 'July 10, 2010', file_desc = 'At grandpa\'s house on vacation (15 months).'
 
677
        $query = "UPDATE T_files 
 
678
                SET file_title = 'Morning Glory Pool', file_alt = 'Morning Glory Pool', file_desc = 'Morning Glory Pool.' 
659
679
                WHERE file_ID = {$edit_File->ID}";
660
680
        $DB->query( $query );
661
681