logo-pods-headerLike any other plugin Pods requires the user to read the documentation and make use of the forums especially if they are not a programmer like me.  I use the pods pages, templates & {@magic tags} adapted from an example on the pods site, this works for me. I have made great use of the pods Framework. The first thing I used pods for was a list of organisations,  which can be seen here This page is generated from the pods data in records, 1 record per organisation. This Required a lot of custom code For which I got a lot of help from vtxyzzy  who wrote the code to display the 3 organisation pages.

This method is easier to maintain and change compared to  html especially when you have to change lots of  information on the page. It is as simple as open the record requiring the change in the admin area,  update the data in the field and save  the information is now on the page.
The Royal Arch, Cryptic Council, Lodge & Council pages contain 24 different pod fields in organisations and 2 pods fields in Org_type due to the fact that the data is repeated on the page for each organisation and the page has Tables and links in it the code is quite extensive some of which I don’t fully understand but will explain the code I do understand the template is a altered version of my themes page.php it also contain the Functions ( this is due to the fact the functions are only required on these pages, this way it keeps the functions.php from loading things it does not need ) I have to update these pages every year and before pods it took me almost 2 days to change data in certain table fields now it takes less than a Hour

This is the complete code 250 line long

You first must enable [ php ] on the Xtreme Plus PHP admin tab.

The first bit of code I will explain is
You first must enable [ php ] on the Xtreme Plus PHP admin tab.

this determines what function is run on the page and what data shows to the user.

The next bit is the logged in function

You first must enable [ php ] on the Xtreme Plus PHP admin tab.

line 128 brings the information together in a output for the top line of each organisation.
example:-

St. John No. 257- Logged In

The next part is the Table layout with the css classes most of it is self explanatory
the output looks like this
stjohn

if you notice the image above it has some links on the second bottom line
You first must enable [ php ] on the Xtreme Plus PHP admin tab.

notice the “if” statements for each item in the code this will only show in the organisation table if the organisation has data in the relevant fields for the pod, line 172 makes reference to the link for the calendar but the

 < ?php echo $info['calendar']; ?> 

this code is replaced with the category id of the organisation in this case 19 “st.john” to complete the path of the link. You first must enable [ php ] on the Xtreme Plus PHP admin tab.

To see the live link click here

at the end of the organisation is the code to take you back to the top of the page

You first must enable [ php ] on the Xtreme Plus PHP admin tab.

between each organisation is the separator bar
You first must enable [ php ] on the Xtreme Plus PHP admin tab.
the separator bar is pulled from a different pod “org_type” and helps keep the organisations separate, the 3 different organisations have a different separator bar

The last part produces links at the top of the page to the organisation by there number
You first must enable [ php ] on the Xtreme Plus PHP admin tab.
this produced the result below

nav

To show the organisations on a page you select the template and custom field
custom

The Pgracglasgow Website makes extensive use of pods on the following Pages:

past Grand Superintendents ,  Office Bearers , Committee, Recorders , Honorary , Provincial Links , Royal Arch , Cryptic Council , Lodge & Council

each of these pages make use of

 < ?php if ( is_user_logged_in() ) { ?>

This allows users that are logged in to see an extra column with contact details to keep them private

More recently I have used it for simple lists examples here and here code for this is given below

Each of these Examples consist of a pods page & Pods Template

The page Gets the pod and will read the records for that pod, the pods page can have html in it as well as the PHP to call the data in the example below I have the headings for the table columns in HTML before I call the pod  & template to generate the information

You first must enable [ php ] on the Xtreme Plus PHP admin tab.

The Template makes use of Magic tags {@field _name} you can use PHP , HTML, Magic tags  and CSS in templates

You first must enable [ php ] on the Xtreme Plus PHP admin tab.

Notice how little code is actually here this give the output for each line in the results and keeps looping till the records per page limit is reached.

To Display it properly in a page you need to alter your theme template file, I edited the page.php file

this is the original weaver page template

You first must enable [ php ] on the Xtreme Plus PHP admin tab.

And this is the  Altered File
You first must enable [ php ] on the Xtreme Plus PHP admin tab.

This template will load all pods pages just select it in the pods  page it will give you the normal theme look

Forms

Now for the interesting bit that cost me Many Painkillers and lack of sleep

Until now I entered all new records in the Admin Area  but needing a front end form for someone else to input records  caused me many problems there is no help or information in pods about styling the actual form

to show a form on the front end is simple
You first must enable [ php ] on the Xtreme Plus PHP admin tab.
But my problem is it looks nothing like a real form not just a list of Fields and inputs next to them. No one wants this on the page for others to see, With many searches on the forums and trying other methods (add, save) to no avail then I started to  look at the form in firebug BINGO  so onto trial and error with CSS  first off  I am not a programmer  and can get by with CSS with help from S3Schools. If you want a different heading (more fitting ) change the name of the field in the pods. This does not affect the how the pod uses the  information

to save me showing all the CSS I will only show the main CSS classes needed to control the fields on the form (remember your field names will be different)
You first must enable [ php ] on the Xtreme Plus PHP admin tab.
notice the text in red this is the class, that also controls the label and input fields, notice the word “ROW” as each fields is actually in a row of it’s own changing the code for this class also affects the other 2 classes that are used

This Code controls the input field can set the width
You first must enable [ php ] on the Xtreme Plus PHP admin tab.
to change the label in the form use this code
You first must enable [ php ] on the Xtreme Plus PHP admin tab.
So the 3 different classes used are
You first must enable [ php ] on the Xtreme Plus PHP admin tab.
Hope this information  helps someone


Comments

Pods Framework — No Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

HTML tags allowed in your comment: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>