SlideShare a Scribd company logo
Image Content Management
Overview
Objective
Learn how to manipulate image content of ProdigyView’s built-
in content management system. Also learn how to upload an
image file directly to the cms.
Requirements
 Installed version of ProdigyView with a database
 Understanding of base content
 Understanding of the DEFINES in ProdigyView
Estimated Time
12 minutes

                       www.prodigyview.com
Follow Along With Code
                 Example
1. Download a copy of the example code at
  www.prodigyview.com/source.
2. Install the system in an environment you feel comfortable
  testing in.
3. Proceed to examples/content/ImageContentExample.php
What Is Image Content?
Image content is content involves displaying an image.
Image Content in the cms supports uploading files directly
into the cms. The formats that can be used with the file
upload is png, jpeg, and gifs. Use image for web
applications such as in the example below and what ever
your imagination can expand too.

  Galleries                       Photo Albums
  Showcases                       Blogging
  Ecommerce Products              etc

                      www.prodigyview.com
Extends Base Content
Like the other content types, image content extends base
content. This means it has all the fields that base content
has in addition to the fields that describes an image.




      Image Content Fields                     Base Content Fields




                         www.prodigyview.com
Create Image Content
  Image content is relatively easy to create. In an array, passed
  defined fields into PVContent::createImageContent method.

                       1. Define the content that will be stored as image content




3. Return content id        2. Pass the array to PVContent::createTextContent
Database View
Remember that the image content utilizes both the base
content and image content fields. This is accomplished
by joining two tables. Your two tables in the database
should look something like below.


                   Base Content Database View




                 Image Content Database View
Image Content
        Fields
The previous slide only showed a
few fields that can be set when
defining image content. Here is a
complete list of fields that apply only
to the image content.




                           www.prodigyview.com
Creating An Image with File
A feature of the image content in ProdigyView is the ability
upload files while creating or updating content. For the next
example, change your sample code to

examples/content/ImageContentExampleWithFile.php
Image File Arguments
Similar to creating a normal image, creating an image with a file is
accomplished through setting arguments. In the example below,
we are using an image from our file system. But it can be set the
same way using PHP’s $_FILES global.


 1. Name of the file              2. The location the file currently resides




   3. The size of the file                     4. The type of file
Create Image With a File
Now pass those arguments to the
PVContent::createImageWithFile() method. The content
id will be return and the image placed in your PV_IMAGE
define folder.
Database View
The file will be uploaded will be placed in the PV_IMAGE folder
and a reference link will be placed in the database. Your database
should look something like this:


 1. Mime type               2. Image size




 3. Auto generated random file name         4. Generated file name of thumbnail




                             www.prodigyview.com
Search for Image Content
 Using the syntax from the PV Standard Search Query, we
 can search for content related to images on using fields for
 both base content and image content.

       1. Search based on the passed arguments




                                     2. Pass args into getImageContentList()
                                     method
3. Returns an array of arrays that
contains the list of event content
Iterate Through The List
Next we can iterate through the list of image content to
see the data we just added.

1. Iterate through the fields base content




                             2. With the automatic joining of the tables, image
                             content fields are also returned
Retrieving Image Content
Image content can also be retrieved directly using the
content id. The data associated with that event id will be
returned in array.
                                      1. Pass in the content id

2. Content is returned in an array




3. Get the values of the array by specifying
the associated index
Updating Image Content
That array contains the information for updating image content.
Simply change a value at an index in the array and pass it to
PVContent::updateImageContent() method. Remember the
content_id variable is required.



       1. Update the owner id of the content array




                               2. Pass the array back to update
Updating With File
Referring back to
examples/content/ImageContentExampleWithFile.php, we
can also update the image file associated with the content id.
The old file will be replaced.

 1. Set the name of the file      2. The current location of the file to
                                  copy




   3. The size of the file      4. The type of the file
Deleting Image Content
The last action to take place is deleting the image content.
To delete content, we pass the content id into
PVContent::deleteContent method.

All the content types(audio, video, event, etc) use the
PVContent::deleteContent method. Associated files
will be deleted also.




                      www.prodigyview.com
Review
1. Create image content by passing an array of arguments into
   PVContent::createImageContent()

2. PVContent::createImageContent() will return the id of the
   newly generated image content

3. Search for image content by using the syntax from PV
   Standard Search Query and passing those arguments into
   PVContent::getImageContentList()

4. Update content by passing an array of accepted fields in
   PVContent::updateImageContent(). The content_id must
   be present for this method to work.

5. Delete image content by passing the content_id into
   PVContent::deleteContent().
                        www.prodigyview.com
API Reference
For a better understanding of image content, visit the api
by clicking on the link below.

PVContent




                 More Tutorials
For more tutorials, please visit:

http://www.prodigyview.com/tutorials


                       www.prodigyview.com

More Related Content

More from ProdigyView

Email Configuration
Email ConfigurationEmail Configuration
Email Configuration
ProdigyView
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements Tutorial
ProdigyView
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
ProdigyView
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags Tutorial
ProdigyView
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHP
ProdigyView
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyView
ProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHP
ProdigyView
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHP
ProdigyView
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
ProdigyView
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS Libraries
ProdigyView
 
PHP Libraries
PHP LibrariesPHP Libraries
PHP Libraries
ProdigyView
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
ProdigyView
 
Database Basics
Database BasicsDatabase Basics
Database Basics
ProdigyView
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design Pattern
ProdigyView
 
Intercepting Filters Design Pattern
Intercepting Filters Design PatternIntercepting Filters Design Pattern
Intercepting Filters Design Pattern
ProdigyView
 
Creating Dynamic Objects PHP
Creating Dynamic Objects PHPCreating Dynamic Objects PHP
Creating Dynamic Objects PHP
ProdigyView
 
PV Standard Search Query
PV Standard Search QueryPV Standard Search Query
PV Standard Search Query
ProdigyView
 
Learning PHP Basics Part 2
Learning PHP Basics Part 2Learning PHP Basics Part 2
Learning PHP Basics Part 2
ProdigyView
 

More from ProdigyView (18)

Email Configuration
Email ConfigurationEmail Configuration
Email Configuration
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements Tutorial
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms Tutorial
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags Tutorial
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHP
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHP
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHP
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web Cache
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS Libraries
 
PHP Libraries
PHP LibrariesPHP Libraries
PHP Libraries
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements Tutorial
 
Database Basics
Database BasicsDatabase Basics
Database Basics
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design Pattern
 
Intercepting Filters Design Pattern
Intercepting Filters Design PatternIntercepting Filters Design Pattern
Intercepting Filters Design Pattern
 
Creating Dynamic Objects PHP
Creating Dynamic Objects PHPCreating Dynamic Objects PHP
Creating Dynamic Objects PHP
 
PV Standard Search Query
PV Standard Search QueryPV Standard Search Query
PV Standard Search Query
 
Learning PHP Basics Part 2
Learning PHP Basics Part 2Learning PHP Basics Part 2
Learning PHP Basics Part 2
 

Recently uploaded

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
Brandon Minnick, MBA
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Jeffrey Haguewood
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
Zilliz
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
Pixlogix Infotech
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Alpen-Adria-Universität
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
ssuserfac0301
 

Recently uploaded (20)

How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
Choosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptxChoosing The Best AWS Service For Your Website + API.pptx
Choosing The Best AWS Service For Your Website + API.pptx
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
Salesforce Integration for Bonterra Impact Management (fka Social Solutions A...
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
 
Fueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte WebinarFueling AI with Great Data with Airbyte Webinar
Fueling AI with Great Data with Airbyte Webinar
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
Best 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERPBest 20 SEO Techniques To Improve Website Visibility In SERP
Best 20 SEO Techniques To Improve Website Visibility In SERP
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing InstancesEnergy Efficient Video Encoding for Cloud and Edge Computing Instances
Energy Efficient Video Encoding for Cloud and Edge Computing Instances
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Taking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdfTaking AI to the Next Level in Manufacturing.pdf
Taking AI to the Next Level in Manufacturing.pdf
 

Image Content Management

  • 2. Overview Objective Learn how to manipulate image content of ProdigyView’s built- in content management system. Also learn how to upload an image file directly to the cms. Requirements  Installed version of ProdigyView with a database  Understanding of base content  Understanding of the DEFINES in ProdigyView Estimated Time 12 minutes www.prodigyview.com
  • 3. Follow Along With Code Example 1. Download a copy of the example code at www.prodigyview.com/source. 2. Install the system in an environment you feel comfortable testing in. 3. Proceed to examples/content/ImageContentExample.php
  • 4. What Is Image Content? Image content is content involves displaying an image. Image Content in the cms supports uploading files directly into the cms. The formats that can be used with the file upload is png, jpeg, and gifs. Use image for web applications such as in the example below and what ever your imagination can expand too.  Galleries  Photo Albums  Showcases  Blogging  Ecommerce Products  etc www.prodigyview.com
  • 5. Extends Base Content Like the other content types, image content extends base content. This means it has all the fields that base content has in addition to the fields that describes an image. Image Content Fields Base Content Fields www.prodigyview.com
  • 6. Create Image Content Image content is relatively easy to create. In an array, passed defined fields into PVContent::createImageContent method. 1. Define the content that will be stored as image content 3. Return content id 2. Pass the array to PVContent::createTextContent
  • 7. Database View Remember that the image content utilizes both the base content and image content fields. This is accomplished by joining two tables. Your two tables in the database should look something like below. Base Content Database View Image Content Database View
  • 8. Image Content Fields The previous slide only showed a few fields that can be set when defining image content. Here is a complete list of fields that apply only to the image content. www.prodigyview.com
  • 9. Creating An Image with File A feature of the image content in ProdigyView is the ability upload files while creating or updating content. For the next example, change your sample code to examples/content/ImageContentExampleWithFile.php
  • 10. Image File Arguments Similar to creating a normal image, creating an image with a file is accomplished through setting arguments. In the example below, we are using an image from our file system. But it can be set the same way using PHP’s $_FILES global. 1. Name of the file 2. The location the file currently resides 3. The size of the file 4. The type of file
  • 11. Create Image With a File Now pass those arguments to the PVContent::createImageWithFile() method. The content id will be return and the image placed in your PV_IMAGE define folder.
  • 12. Database View The file will be uploaded will be placed in the PV_IMAGE folder and a reference link will be placed in the database. Your database should look something like this: 1. Mime type 2. Image size 3. Auto generated random file name 4. Generated file name of thumbnail www.prodigyview.com
  • 13. Search for Image Content Using the syntax from the PV Standard Search Query, we can search for content related to images on using fields for both base content and image content. 1. Search based on the passed arguments 2. Pass args into getImageContentList() method 3. Returns an array of arrays that contains the list of event content
  • 14. Iterate Through The List Next we can iterate through the list of image content to see the data we just added. 1. Iterate through the fields base content 2. With the automatic joining of the tables, image content fields are also returned
  • 15. Retrieving Image Content Image content can also be retrieved directly using the content id. The data associated with that event id will be returned in array. 1. Pass in the content id 2. Content is returned in an array 3. Get the values of the array by specifying the associated index
  • 16. Updating Image Content That array contains the information for updating image content. Simply change a value at an index in the array and pass it to PVContent::updateImageContent() method. Remember the content_id variable is required. 1. Update the owner id of the content array 2. Pass the array back to update
  • 17. Updating With File Referring back to examples/content/ImageContentExampleWithFile.php, we can also update the image file associated with the content id. The old file will be replaced. 1. Set the name of the file 2. The current location of the file to copy 3. The size of the file 4. The type of the file
  • 18. Deleting Image Content The last action to take place is deleting the image content. To delete content, we pass the content id into PVContent::deleteContent method. All the content types(audio, video, event, etc) use the PVContent::deleteContent method. Associated files will be deleted also. www.prodigyview.com
  • 19. Review 1. Create image content by passing an array of arguments into PVContent::createImageContent() 2. PVContent::createImageContent() will return the id of the newly generated image content 3. Search for image content by using the syntax from PV Standard Search Query and passing those arguments into PVContent::getImageContentList() 4. Update content by passing an array of accepted fields in PVContent::updateImageContent(). The content_id must be present for this method to work. 5. Delete image content by passing the content_id into PVContent::deleteContent(). www.prodigyview.com
  • 20. API Reference For a better understanding of image content, visit the api by clicking on the link below. PVContent More Tutorials For more tutorials, please visit: http://www.prodigyview.com/tutorials www.prodigyview.com