SlideShare une entreprise Scribd logo
1  sur  18
File Content Management




        www.prodigyview.com
Overview
Objective
Learn how to manipulate file content of ProdigyView’s built-in
content management system. Also learn how to upload a file
directly into 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/FileContentWithFileExample.php
What Is File Content?
File content is a generic way of storing information related
to a file. Unlike video, audio and image content, file content
allows any kind of file to be specified.


  Document System                  Generic Uploaded Files
  Versioning                       Attachment Management
  File Management                  Etc




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




       File Content Fields                         Base Content Fields




                             www.prodigyview.com
Create File Content
  File content is relatively easy to create. In an array, passed
  defined fields into PVContent::createFileContent method.
                       1. Define the content that will be stored as file content




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


                    Base Content Database View




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




                           www.prodigyview.com
Creating A File with File
Similar to creating normal file content, creating file content with
a file is accomplished through setting arguments correctly. In the
example below, we are using a file 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 File Content With a
                   File
Now pass those arguments to the
PVContent::createFileWithFile() method. The content id will be
return and the image placed in your PV_FILE define folder.




                        www.prodigyview.com
Database View
The file will be uploaded will be placed in the PV_FILE folder and
a reference link will be placed in the database. Your database
should look something like this:


 1. Mime type                2. File size




 3. Auto generated random file name for to reference




                              www.prodigyview.com
Search for File Content
 Using the syntax from the PV Standard Search Query, we
 can search for content related to files on fields for both
 base content and file content.

       1. Search based on the passed arguments




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

1. Iterate through the fields base content




                             2. With the automatic joining of the tables, file
                             content fields are also returned
Retrieving File Content
File content can also be retrieved directly using the
content id. The data associated with that content 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 File Content
That array contains the information for updating the file content.
Simply change a value at an index in the array and pass it to
PVContent::updateFileContent() method. Remember the
content_id variable is required.



       1. Update the data determining if the file is downloadable and the
       max downloads




                               2. Pass the array back to update
Deleting File Content
The last action to take place is deleting the file 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 file content by passing an array of arguments into
   PVContent::createFileContent()

2. PVContent::createFileContent() will return the id of the
   newly generated file content

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

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

5. Delete file content by passing the content_id into
   PVContent::deleteContent().
                         www.prodigyview.com
API Reference
For a better understanding of file 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

Contenu connexe

Similaire à File Content Management

Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB MahmoudOHassouna
 
14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20Vivek chan
 
TERMINALFOUR t44u 2009 - University of York Case Study
TERMINALFOUR t44u 2009 - University of York Case StudyTERMINALFOUR t44u 2009 - University of York Case Study
TERMINALFOUR t44u 2009 - University of York Case StudyTerminalfour
 
PowerApps and Azure SQL Server / Blob storage
PowerApps and Azure SQL Server / Blob storagePowerApps and Azure SQL Server / Blob storage
PowerApps and Azure SQL Server / Blob storagePeter Heffner
 
BioJS specification document
BioJS specification documentBioJS specification document
BioJS specification documentRafael C. Jimenez
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themesDaisyOlsen
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themesDaisyOlsen
 
Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Sunil kumar Mohanty
 
Orchard Dynamic Class Extensions
Orchard Dynamic Class ExtensionsOrchard Dynamic Class Extensions
Orchard Dynamic Class Extensionsmarkdolar
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and outputallenbailey
 
Uploadifyv2 1-0manual-100417052228-phpapp01
Uploadifyv2 1-0manual-100417052228-phpapp01Uploadifyv2 1-0manual-100417052228-phpapp01
Uploadifyv2 1-0manual-100417052228-phpapp01Nut Jaya
 
Active Server Page - ( ASP )
Active Server Page - ( ASP )Active Server Page - ( ASP )
Active Server Page - ( ASP )MohitJoshi154
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themesDaisyOlsen
 
File Input & Output
File Input & OutputFile Input & Output
File Input & OutputPRN USM
 
Murach: How to use Entity Framework EF Core
Murach: How to use Entity Framework EF  CoreMurach: How to use Entity Framework EF  Core
Murach: How to use Entity Framework EF CoreMahmoudOHassouna
 

Similaire à File Content Management (20)

Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
Murach': HOW TO DEVELOP A DATA DRIVEN MVC WEB
 
14 asp.net session20
14 asp.net session2014 asp.net session20
14 asp.net session20
 
TERMINALFOUR t44u 2009 - University of York Case Study
TERMINALFOUR t44u 2009 - University of York Case StudyTERMINALFOUR t44u 2009 - University of York Case Study
TERMINALFOUR t44u 2009 - University of York Case Study
 
PowerApps and Azure SQL Server / Blob storage
PowerApps and Azure SQL Server / Blob storagePowerApps and Azure SQL Server / Blob storage
PowerApps and Azure SQL Server / Blob storage
 
BioJS specification document
BioJS specification documentBioJS specification document
BioJS specification document
 
Processing files sequentially in mule
Processing files sequentially in muleProcessing files sequentially in mule
Processing files sequentially in mule
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
 
Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample Spring IOC advantages and developing spring application sample
Spring IOC advantages and developing spring application sample
 
People aggregator
People aggregatorPeople aggregator
People aggregator
 
Biothings presentation
Biothings presentationBiothings presentation
Biothings presentation
 
Orchard Dynamic Class Extensions
Orchard Dynamic Class ExtensionsOrchard Dynamic Class Extensions
Orchard Dynamic Class Extensions
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and output
 
Uploadifyv2 1-0manual-100417052228-phpapp01
Uploadifyv2 1-0manual-100417052228-phpapp01Uploadifyv2 1-0manual-100417052228-phpapp01
Uploadifyv2 1-0manual-100417052228-phpapp01
 
Task 3
Task 3Task 3
Task 3
 
Active Server Page - ( ASP )
Active Server Page - ( ASP )Active Server Page - ( ASP )
Active Server Page - ( ASP )
 
Meetup child-themes
Meetup child-themesMeetup child-themes
Meetup child-themes
 
File Input & Output
File Input & OutputFile Input & Output
File Input & Output
 
IBM File Net P8
IBM File Net P8IBM File Net P8
IBM File Net P8
 
Murach: How to use Entity Framework EF Core
Murach: How to use Entity Framework EF  CoreMurach: How to use Entity Framework EF  Core
Murach: How to use Entity Framework EF Core
 

Plus de ProdigyView

Installing Plug-ins
Installing Plug-insInstalling Plug-ins
Installing Plug-insProdigyView
 
Building An Application
Building An ApplicationBuilding An Application
Building An ApplicationProdigyView
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing ApplicationsProdigyView
 
Email Configuration
Email ConfigurationEmail Configuration
Email ConfigurationProdigyView
 
HTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialHTML5 Tags and Elements Tutorial
HTML5 Tags and Elements TutorialProdigyView
 
HTML Forms Tutorial
HTML Forms TutorialHTML Forms Tutorial
HTML Forms TutorialProdigyView
 
Html Tags Tutorial
Html Tags TutorialHtml Tags Tutorial
Html Tags TutorialProdigyView
 
Video Conversion PHP
Video Conversion PHPVideo Conversion PHP
Video Conversion PHPProdigyView
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics PHPProdigyView
 
Tools ProdigyView
Tools ProdigyViewTools ProdigyView
Tools ProdigyViewProdigyView
 
Custom Validation PHP
Custom Validation PHPCustom Validation PHP
Custom Validation PHPProdigyView
 
Basic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPBasic File Cache Tutorial - PHP
Basic File Cache Tutorial - PHPProdigyView
 
Understanding Web Cache
Understanding Web CacheUnderstanding Web Cache
Understanding Web CacheProdigyView
 
Javascript And CSS Libraries
Javascript And CSS LibrariesJavascript And CSS Libraries
Javascript And CSS LibrariesProdigyView
 
SQL Prepared Statements Tutorial
SQL Prepared Statements TutorialSQL Prepared Statements Tutorial
SQL Prepared Statements TutorialProdigyView
 
Implementing the Adapter Design Pattern
Implementing the Adapter Design PatternImplementing the Adapter Design Pattern
Implementing the Adapter Design PatternProdigyView
 
Intercepting Filters Design Pattern
Intercepting Filters Design PatternIntercepting Filters Design Pattern
Intercepting Filters Design PatternProdigyView
 
Creating Dynamic Objects PHP
Creating Dynamic Objects PHPCreating Dynamic Objects PHP
Creating Dynamic Objects PHPProdigyView
 

Plus de ProdigyView (20)

Installing Plug-ins
Installing Plug-insInstalling Plug-ins
Installing Plug-ins
 
Building An Application
Building An ApplicationBuilding An Application
Building An Application
 
Installing Applications
Installing ApplicationsInstalling Applications
Installing Applications
 
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
 
Sending Email Basics PHP
Sending Email Basics PHPSending Email Basics PHP
Sending Email Basics 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
 

Dernier

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 

File Content Management

  • 1. File Content Management www.prodigyview.com
  • 2. Overview Objective Learn how to manipulate file content of ProdigyView’s built-in content management system. Also learn how to upload a file directly into 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/FileContentWithFileExample.php
  • 4. What Is File Content? File content is a generic way of storing information related to a file. Unlike video, audio and image content, file content allows any kind of file to be specified.  Document System  Generic Uploaded Files  Versioning  Attachment Management  File Management  Etc www.prodigyview.com
  • 5. Extends Base Content Like the other content types, file content extends base content. This means it has all the fields that base content has in addition to the fields that describes a file. File Content Fields Base Content Fields www.prodigyview.com
  • 6. Create File Content File content is relatively easy to create. In an array, passed defined fields into PVContent::createFileContent method. 1. Define the content that will be stored as file content 3. Return content id 2. Pass the array to PVContent::createFileContent
  • 7. Database View Remember that the files content utilizes both the base content and file content fields. This is accomplished by joining two tables. Your two tables in the database should look something like below. Base Content Database View File Content Database View
  • 8. File Content Fields The previous slide only showed a few fields that can be set when defining file content. Here is a complete list of fields that apply only to the file content. www.prodigyview.com
  • 9. Creating A File with File Similar to creating normal file content, creating file content with a file is accomplished through setting arguments correctly. In the example below, we are using a file 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
  • 10. Create File Content With a File Now pass those arguments to the PVContent::createFileWithFile() method. The content id will be return and the image placed in your PV_FILE define folder. www.prodigyview.com
  • 11. Database View The file will be uploaded will be placed in the PV_FILE folder and a reference link will be placed in the database. Your database should look something like this: 1. Mime type 2. File size 3. Auto generated random file name for to reference www.prodigyview.com
  • 12. Search for File Content Using the syntax from the PV Standard Search Query, we can search for content related to files on fields for both base content and file content. 1. Search based on the passed arguments 2. Pass args into getFileContentList() method 3. Returns an array of arrays that contains the list of file content
  • 13. Iterate Through The List Next we can iterate through the list of file content to see the data we just added. 1. Iterate through the fields base content 2. With the automatic joining of the tables, file content fields are also returned
  • 14. Retrieving File Content File content can also be retrieved directly using the content id. The data associated with that content 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
  • 15. Updating File Content That array contains the information for updating the file content. Simply change a value at an index in the array and pass it to PVContent::updateFileContent() method. Remember the content_id variable is required. 1. Update the data determining if the file is downloadable and the max downloads 2. Pass the array back to update
  • 16. Deleting File Content The last action to take place is deleting the file 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
  • 17. Review 1. Create file content by passing an array of arguments into PVContent::createFileContent() 2. PVContent::createFileContent() will return the id of the newly generated file content 3. Search for file content by using the syntax from PV Standard Search Query and passing those arguments into PVContent::getFileContentList() 4. Update content by passing an array of accepted fields in PVContent::updateFileContent(). The content_id must be present for this method to work. 5. Delete file content by passing the content_id into PVContent::deleteContent(). www.prodigyview.com
  • 18. API Reference For a better understanding of file 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