Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   New Versions, & Updating (http://forum.bytesforall.com/forumdisplay.php?f=12)
-   -   3.6.7 This is awful. I have a ton of custom php code (http://forum.bytesforall.com/showthread.php?t=14140)

wittyusername May 11, 2011 02:09 PM

3.6.7 This is awful. I have a ton of custom php code
 
This is awful. I have a ton of custom php code in many ata installs. Looks like i won't be upgrading any time soon.

2. how am i supposed to customize the theme in the future? put my php directly into the index.php (or whatever) template?

johnh44 May 12, 2011 02:03 PM

Quote:

Originally Posted by wittyusername (Post 65186)
This is awful. I have a ton of custom php code in many ata installs. Looks like i won't be upgrading any time soon. ...

YIKES! Same here ... does this even include such php as Wordpress's own references, such as this in the CSS INSERTS area:

HTML Code:

background: url('<?php bloginfo('template_directory'); ?>/images/bullets/round-gray.gif') no-repeat 0 7px;

lmilesw May 12, 2011 02:05 PM

Yes it does. You need to use full paths now.

johnh44 May 12, 2011 06:40 PM

Quote:

Originally Posted by lmilesw (Post 65297)
Yes it does. You need to use full paths now.

Bummer. Not you guys, of course -- victims of the WordPress tightening like the rest of us. Just makes upgrades more difficult because of need to enter new directory names for URLs in the CSS Inserts.

Any reason the atahualpa directory under themes cannot retain the same name? E.G. ayahualpa.

lmilesw May 12, 2011 06:50 PM

It can retain that name but I like to give it a new name so I can always switch back to a previous version if I have problems. It creates a bit more work in upgrading but gives me peace of mind.

johnh44 May 12, 2011 07:28 PM

Quote:

Originally Posted by lmilesw (Post 65323)
It can retain that name but I like to give it a new name so I can always switch back to a previous version if I have problems. It creates a bit more work in upgrading but gives me peace of mind.

Makes sense, especially when a backstep is needed :)

However, on this whole issue I'm really discouraged. There is SO MUCH PHP in the theme's editable insert areas. Losing all this is a major setback for me as well as for the amazing customizability of Atahualpa. I have multiple templates and see no reasonable way to move beyond 3.6.4 without weeks of work (weeks I don't have). I know I'm whining, but it sure would be nice if there were a detailed to-do- list for this upgrade -- especially as to how if affects the now-defunct "Style & Edit CENTER COLUMN" where multpile <?php is in use.

An idea: Any chance this section could interpret shortcodes? And if so, y'all could park those items in [shortcodes], such as this default ata code: (???)

HTML Code:

<?php /* For MULTI post pages if activated at ATO -> Next/Previous Navigation: */ bfa_next_previous_page_links('Top'); ?> <?php if( is_category() AND function_exists('page2cat_output')) { page2cat_output($cat); } ?>
If not, where exactly in the templates would each of these code snippets be put?

lmilesw May 12, 2011 10:06 PM

Honestly I would just stay with 3.6.4.

Flynn May 13, 2011 09:42 AM

It's not the end all to anything PHP though

Raw PHP isn't possible anymore but PHP functions that are known beforehand can be parsed as text string and then executed as I added in 3.6.7 for the function

<?php bfa_widget_area('....'); ?>

I'll add this for a whole bunch of PHP functions so hopefully you'll be able to upgrade smoothly to 3.6.8 WITH custom PHP code

PHP code with logic (IF/ELSE FOREACH WHILE) won't work though, only simple PHP one liners, 1 function with or without parameters:

<?php functionname('paremeter1=Paramater 1&parameter2=Parameter 2&.......'); ?>

This should however cover most of the custom PHP that is being used in Atahualpa

lmilesw May 13, 2011 10:31 AM

With the ability to add a new widget area You can add a New Widget area in various places such as ATO>Add HTML/CSS Inserts>HTML Inserts: Body Top or ATO>Style & Edit Header Area>Configure Header Area and then use a PHP aware widget in those areas.

johnh44 May 13, 2011 05:41 PM

Quote:

Originally Posted by Flynn (Post 65367)
It's not the end all to anything PHP though

... hopefully you'll be able to upgrade smoothly to 3.6.8 WITH custom PHP code

This sounds good. Also, I've made quite a few custom templates that are essentially the same (copies of index.php) but with different combinations of sidebars. Rather than make changes in multiple templates, what you are making sounds like a solution or partial solution. Creating an include file for what's unchanging in multiple templates is also a game plan ...

Meanwhile, I'm with lmilesw:

Quote:

Honestly I would just stay with 3.6.4.

lmilesw May 13, 2011 10:31 PM

I should have said "In your case I would just stay with 3.6.4 for now". Going with 3.6.7 makes sense for a great majority of people.

vincent May 13, 2011 11:41 PM

Is creating an ATA plugin an option to enable PHP into the theme's editable insert areas?

- Vincent

sudipto May 20, 2011 04:00 PM

Hi John,
I have given a solution to reactivate PHP in this thread
http://forum.bytesforall.com/showthr...&highlight=php

But you need to edit the functions.php file.

I totally agree with Vincent that we can create a plugin to activate php in Atahualpa.

Like the theme can contain a pluggable functions like wordpess has that can be called from plugins. Well thats just a thought. Anyways I trust Flynn and he will definitely come up with something.

But I am sticking to 3.6.4 because i have custom code in the loop section that has been removed in 3.6.7. Hope Flynn activates it back again soon

rvconnelly May 26, 2011 03:37 PM

Quote:

Originally Posted by Flynn (Post 65367)
It's not the end all to anything PHP though

Raw PHP isn't possible anymore but PHP functions that are known beforehand can be parsed as text string and then executed as I added in 3.6.7 for the function

<?php bfa_widget_area('....'); ?>

I'll add this for a whole bunch of PHP functions so hopefully you'll be able to upgrade smoothly to 3.6.8 WITH custom PHP code

PHP code with logic (IF/ELSE FOREACH WHILE) won't work though, only simple PHP one liners, 1 function with or without parameters:

<?php functionname('paremeter1=Paramater 1&parameter2=Parameter 2&.......'); ?>

This should however cover most of the custom PHP that is being used in Atahualpa

I am currently using 3.6.4 (fyi... I have some html & css knowledge & a little js, but no php). I have the following code added to the Atahualpa option "FOOTER: Single Post Pages".

<span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Twitter'></span>

The above code is an example of 5 social media buttons that display on Single Post Pages BUT NOT on Multi Post Pgs or the Home Page (I had to turn off the ShareThis plugin's auto insert capability to do this. They place it on all post pages).

This is currently working with 3.6.4.... when a social media button is clicked, it uses the title/permalink of the post in the text link, saving the site-visitor the trouble of typing it out (see www.renderyourvision.com).

I assume this php functionality will be disabled if/when I upgrade to a more current version of Atahualpa.

My question is, if I create a widget "area" and place it in FOOTER: SINGLE POST PAGES, will the php then still work in versions 3.6.7 and up? -Thank you.

lmilesw May 26, 2011 05:19 PM

I have had success doing what you mention. I would recommend a manual upgrade so you can test and if there are issues you can just switch back to 3.6.4.

rvconnelly May 26, 2011 07:32 PM

Thanks for the feedback, Larry, but I was wondering if Flynn could briefly comment as to whether this string is the type he was talking about in his post #8, above:

<span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Twitter'></span>


Here's a snippet of his post:

Quote:

Originally Posted by Flynn (Post 65367)
... only simple PHP one liners, 1 function with or without parameters:
<?php functionname('paremeter1=Paramater 1&parameter2=Parameter 2&.......'); ?>
This should however cover most of the custom PHP that is being used in Atahualpa


juggledad May 26, 2011 07:39 PM

I believe those are the types of things he is talking about. However, there is no way every function could be checked and programmed in.

rvconnelly May 26, 2011 08:44 PM

Ok. Thanks. I will test it after I upgrade to 3.6.7. If it works, I will confirm in a post (for anyone else that might be using the shareThis plugin with Atahualpa theme). By the way, awesome theme. You guys do GREAT work. Thanks again.

rvconnelly Jun 2, 2011 06:35 PM

I have this code loaded in EDIT POST/PAGE INFO ITEMS > FOOTER: SINGLE POST PAGES:

<span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Twitter'></span>
<span class='st_facebook' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Facebook'></span>
<span class='st_linkedin' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='LinkedIn'></span>
<span class='st_email' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Email'></span>
<span class='st_sharethis' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='ShareThis'></span>


It works with Ata 3.6.4 (WP 3.1.3) but not in Ata 3.6.7 (WP 3.1.3). It picks up the post title and loads it into the social media share screen after the user logs in. ShareThis.com is a pretty popular Wordpress plugin. I have double checked the plugin settings so I assume that this is due to the WP requirement to remove PHP functionality.

Can this type of simple PHP function be included as an option in 3.6.8?

juggledad Jun 2, 2011 07:20 PM

do a forum search for 'What PHP functions do you want to see as options in 3.6.8?'

ymf Jun 2, 2011 10:11 PM

I don't have any of my own php code in the options, yet I somehow have some php code there, as seen in the following extract from the Export of the current Atahualpa settings:

Code:

"content_above_loop":"<?php \/* For MULTI post pages if activated at ATO -> Next\/Previous Navigation: *\/\r\nbfa_next_previous_page_links('Top'); ?>\r\n\r\n<?php \/* For the plugin Page2Cat http:\/\/wordpress.org\/extend\/plugins\/page2cat\/ *\/\r\nif( is_category() AND function_exists('page2cat_output')) { page2cat_output($cat); } ?>",

"content_inside_loop":"<?php \/* For SINGLE post pages if activated at ATO -> Next\/Previous Navigation: *\/\r\nbfa_next_previous_post_links('Top'); ?>\r\n\r\n<?php \/* Post Container starts here *\/\r\nif ( function_exists('post_class') ) { ?>\r\n<div <?php if ( is_page() ) { post_class('post'); } else { post_class(\"$odd_or_even\"); } ?> id=\"post-<?php the_ID(); ?>\">\r\n<?php } else { ?>\r\n<div class=\"<?php echo ( is_page() ? 'page ' : '' ) . $odd_or_even . ' post\" id=\"post-'; the_ID(); ?>\">\r\n<?php } ?>\r\n\r\n<?php bfa_post_kicker('<div class=\"post-kicker\">','<\/div>'); ?>\r\n\r\n<?php bfa_post_headline('<div class=\"post-headline\">','<\/div>'); ?>\r\n\r\n<?php bfa_post_byline('<div class=\"post-byline\">','<\/div>'); ?>\r\n\r\n<?php bfa_post_bodycopy('<div class=\"post-bodycopy clearfix\">','<\/div>'); ?>\r\n\r\n<?php bfa_post_pagination('<p class=\"post-pagination\"><strong>'.__('Pages:','atahualpa').'<\/strong>','<\/p>'); ?>\r\n\r\n<?php bfa_post_footer('<div class=\"post-footer\">','<\/div>'); ?>\r\n\r\n<\/div><!-- \/ Post -->",

"content_below_loop":"<?php \/* Displayed on SINGLE post pages if activated at ATO -> Next\/Previous Navigation: *\/\r\nbfa_next_previous_post_links('Middle'); ?>\r\n\r\n<?php \/* Load Comments template (on single post pages, and static pages, if set on options page): *\/\r\nbfa_get_comments(); ?>\r\n\r\n<?php \/* Displayed on SINGLE post pages if activated at ATO -> Next\/Previous Navigation: *\/\r\nbfa_next_previous_post_links('Bottom'); ?>\r\n\t\t\r\n<?php \/* Archives Pages. Displayed on a specific static page, if configured at ATO -> Archives Pages: *\/\r\nbfa_archives_page('<div class=\"archives-page\">','<\/div>'); ?>\r\n\t\t\t\r\n<?php \/* Displayed on MULTI post pages if activated at ATO -> Next\/Previous Navigation: *\/\r\nbfa_next_previous_page_links('Bottom'); ?>",

"content_not_found":"<h2><?php _e('Not Found','atahualpa'); ?><\/h2>\r\n<p><?php _e(\"Sorry, but you are looking for something that isn't here.\",\"atahualpa\"); ?><\/p>",

I wonder if this php code will be nicely handled when upgrading to 3.7?

juggledad Jun 3, 2011 05:05 AM

yfradkin - If you didn't have modifications to it, it will run fine, that code is now in index.php.

rvconnelly Jun 3, 2011 06:35 PM

Quote:

Originally Posted by rvconnelly (Post 67009)
I have this code loaded in EDIT POST/PAGE INFO ITEMS > FOOTER: SINGLE POST PAGES:

<span class='st_twitter' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Twitter'></span>
<span class='st_facebook' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Facebook'></span>
<span class='st_linkedin' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='LinkedIn'></span>
<span class='st_email' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='Email'></span>
<span class='st_sharethis' st_title='<?php the_title(); ?>' st_url='<?php the_permalink(); ?>' displayText='ShareThis'></span>


It works with Ata 3.6.4 (WP 3.1.3) but not in Ata 3.6.7 (WP 3.1.3). It picks up the post title and loads it into the social media share screen after the user logs in. ShareThis.com is a pretty popular Wordpress plugin. I have double checked the plugin settings so I assume that this is due to the WP requirement to remove PHP functionality.

Can this type of simple PHP function be included as an option in 3.6.8?

Yesterday I asked this question. The reply was to "do a forum search for 'What PHP functions do you want to see as options in 3.6.8?'" I had already seen that thread but wasn't sure this question belonged there (I don't have any php exp; which I explained in #14).

As suggested by Juggledad, I re-posted my question in the other thread. I included as much relevant detail as possible thinking that would be helpful. My post was then summarily deleted by Juggledad for being inappropriate for that thread. Puzzling.

lmilesw Jun 3, 2011 06:58 PM

You could perhaps put a new widget area in the footer area and then use a php aware widget to populate the widget area.

juggledad Jun 3, 2011 08:22 PM

Your question was
Quote:

Can this type of simple PHP function be included as an option in 3.6.8?
so I pointed you to the thread asking what FUNCTIONS were requested for 3.6.8 - In you case you wanted two functions, and everything else was irrelevant, so I removed it. This way the developer can see the functions, not spend his time trying to extract that form a long post.

So the answer to your question is 'Hopefully it will get into 3.6.8'


All times are GMT -6. The time now is 04:12 PM.

Powered by vBulletin® Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.