Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Input Tabs
Ta. You will see it uploaded but it may be a few days yet. I seem to have too many part time occupations at the moment.
Reply
Awesome.

Nothing wrong with branching yourself out! Smile
Reply
Could be a conflict with the GSBlog plugin.

I have a template with a main and sidebar. Can make the blog work but I can't show any content in the sidebar. I can show content from another page with <?php insert_page_content("otherpageslug->sidebar"); ?> but I can't show any content from the sidebar tab on the blog page.
Reply
Hmm... Have you tried adding "false" as a third parameter? Like this:
Code:
<?php insert_page_content("sidebar", "", false); ?>

Adding false should stop other plugins from interfering with a tab.

EDIT: Ok I've found the conflict. Both plugins modify the content of the page using the same hook. Seems the blog plugin is getting in there first.

I'll make a change to ensure that simple_input_tabs always get to content first.

Alright, updated to version 2.2.

Give that a go. Smile
Reply
I have been working on a theme which is far better than the one I made from scratch myself. I uploaded it today and I am going to add some tabbed templates. It's a great plugin.

These are the issues I am coming up with
  • The auto install with a theme just doesn't work for me, not in wamp not on the server. Not too much of a prob.
  • It would be really good to have some holding text visible on the page to show where content will go. I see it in the Editor window but not on the page.
  • I can't put any PHP tags in the tabbed content. so I can't for instance link to an image with get_theme_url. Is that inevitable?
Reply
(2012-12-28, 10:48:01)Timbow Wrote: I have been working on a theme which is far better than the one I made from scratch myself. I uploaded it today and I am going to add some tabbed templates. It's a great plugin.

These are the issues I am coming up with
  • The auto install with a theme just doesn't work for me, not in wamp not on the server. Not too much of a prob.
  • It would be really good to have some holding text visible on the page to show where content will go. I see it in the Editor window but not on the page.
  • I can't put any PHP tags in the tabbed content. so I can't for instance link to an image with get_theme_url. Is that inevitable?

Hmm... anything happening at all with the auto install thingo? I do admit it's experimental.

I'm not following with what you mean by holding text? Do you mean when clicking the magnifying glass you see tab names in the appropriate locations? You can view those from the front-end by adding ?display=preview to the end of the URL.

Php tags? I'm not sure you can do that even without the plugin? I know there is a plugin on extend somewhere that enables php tags to work.
If you want to be fancy it would be possible to use the "name-exec" filter hook in small_plugin_toolkit to achieve this.
Reply
(2012-12-29, 00:25:56)jason.dixon.email Wrote: Hmm... anything happening at all with the auto install thingo? I do admit it's experimental.

I'm not following with what you mean by holding text? Do you mean when clicking the magnifying glass you see tab names in the appropriate locations? You can view those from the front-end by adding ?display=preview to the end of the URL.

Php tags? I'm not sure you can do that even without the plugin? I know there is a plugin on extend somewhere that enables php tags to work.
If you want to be fancy it would be possible to use the "name-exec" filter hook in small_plugin_toolkit to achieve this.

auto install - functions.php deletes itself but the plugin files don't go to the plugins directory.

Holding Text - text that would appear on the page saying 'This is Column2 please edit this text in the Col2 tab'

php tags - alright I think I understand.

I have uploaded the Unbound Theme v1.1 which includes three page templates set up for use with Simple Input Tabs.
Reply
Hi,

Firstly thankyou for a great plugin. I have a question about accessing the content of a tab from a parent page....

I have created a function in the "theme_functions.php" file that accesses all children pages, loops them and and obviously I can access stuff like so:

"$page['url']"

But how can access the content of a specific tab from there?

Any help appreciated. Here is the loop:

PHP Code:
foreach ($newsPages as $page) {
        
$class '';
        if (
$number == $totalItems) { $class 'last'; }
        
$menu .=
        
'<li class="'$class .'">'.
          
'<h2 class="generic-subtitle">' '<a href="'find_url($page['url'],$page['parent']) . '" title="'encode_quotes(cl($page['title'])) .'" class="read-more-link">' encode_quotes(cl($page['title'])) . '</a>' '</h2>'.
          
'<p>' encode_quotes(cl($page['metad'])) . '</p>'.
          
'<p class="last"><a href="'find_url($page['url'],$page['parent']) . '">Read More</a></p>'.
        
'</li>';
        
$number++;
          } 

xx
Reply
(2012-12-29, 03:20:31)Timbow Wrote: Holding Text - text that would appear on the page saying 'This is Column2 please edit this text in the Col2 tab'

Would writing the message in the second input do what you want? ie:

Code:
insert_page_content("col2" , "This is Column2 please edit this text in the Col2 tab");

(2012-12-30, 09:16:59)lukastaylor Wrote: Hi,

Firstly thankyou for a great plugin. I have a question about accessing the content of a tab from a parent page....

I have created a function in the "theme_functions.php" file that accesses all children pages, loops them and and obviously I can access stuff like so:

"$page['url']"

But how can access the content of a specific tab from there?

Any help appreciated.
xx

No problem. Glad you're enjoying it! Smile

Does page['parent'] give you a page slug? You might be able to use:

Code:
insert_page_content( page['parent'] . "->tabname" );
Reply
Thanks. Insert page content doesn't seem to work and when I do this:

echo $page['parent'] . "->Image";

I get:

blog->Imageblog->Imageblog->Image

????!!!! x
Reply
Is that not right?

If you use a -> you can get a tab from a specific page (slug). ie: "blog->image" would be the page slug "blog" and the tab "image".

Or am I misunderstanding the question?
Reply
Sorry if I am being confusing sir Smile

My aim is to get the content of the said tab as HTML. If the selector is correct how do I output the markup within that tab?

Please probe further if I am not being clear.

(2013-01-01, 03:56:23)jason.dixon.email Wrote: Is that not right?

If you use a -> you can get a tab from a specific page (slug). ie: "blog->image" would be the page slug "blog" and the tab "image".

Or am I misunderstanding the question?
Reply
Quote:Sorry if I am being confusing sir Smile

No problem! I feel like I'm missing the obvious, haha. Smile

"insert_page_content( "blog->image" ); Should output the tab directly.

"return_page_content( "blog->image" ); Should return the content to the script so you can do something with the html.

If you go into the plugins settings (under the settings menu) and turn on "show errors". Do you get an error popping up when viewing the page? You do have a tab named "image" on the blog page, right?
Reply
Yeh it's giving me a 404 Sad

From within the loop:

PHP Code:
foreach ($newsPages as $page) {
print_r($page);


If I output the array as above I get:

Array ( [url] => blog-item-1 [pubDate] => Wed, 19 Dec 2012 16:03:06 +0000 [title] => Blog Item 1 [meta] => these are the keywords [metad] => Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis. [menu] => News Item 1 [menuOrder] => 0 [menuStatus] => [template] => blog-item.php [parent] => blog [private] => [author] => admin [returnpage] => Image [slug] => blog-item-1 [filename] => blog-item-1.xml )

... you can see "Image" is there. But yeh I can't seem to output it...

Sad[/php]

(2013-01-01, 12:42:29)jason.dixon.email Wrote:
Quote:Sorry if I am being confusing sir Smile

No problem! I feel like I'm missing the obvious, haha. Smile

"insert_page_content( "blog->image" ); Should output the tab directly.

"return_page_content( "blog->image" ); Should return the content to the script so you can do something with the html.

If you go into the plugins settings (under the settings menu) and turn on "show errors". Do you get an error popping up when viewing the page? You do have a tab named "image" on the blog page, right?
Reply
(2013-01-02, 00:24:12)lukastaylor Wrote: Yeh it's giving me a 404 Sad

From within the loop:

PHP Code:
foreach ($newsPages as $page) {
print_r($page);


If I output the array as above I get:

Array ( [url] => blog-item-1 [pubDate] => Wed, 19 Dec 2012 16:03:06 +0000 [title] => Blog Item 1 [meta] => these are the keywords [metad] => Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis. [menu] => News Item 1 [menuOrder] => 0 [menuStatus] => [template] => blog-item.php [parent] => blog [private] => [author] => admin [returnpage] => Image [slug] => blog-item-1 [filename] => blog-item-1.xml )

... you can see "Image" is there. But yeh I can't seem to output it...

Sad[/php]

That error is good. Now we know the content cannot be found (or is empty) but that the plugin is correctly looking for the tab data.

Are you positive it is in the tab named image? If you try this does anything change?

Code:
insert_page_content( page['slug'] . "->" );

What is in the .xml file blog-item-1.xml (or is that array the contents of the xml? if so is there no "content" section?) and is it in the same directory as other pages? Can you access the page directly in the URL using the page slug?
Reply
Solved!

insert_page_content($page['slug'] . "->Image");

Works like a charm.

Thankyou sir!
Reply
(2013-01-02, 02:14:12)lukastaylor Wrote: Thanks for the continued support.

No problem. Smile

Quote:The code brings back content but from the wrong tab ("Main" not "Image").

Yes I can access the page using the page slug.

Wait... are you looking to get content from child pages displayed on the parent page? I might be having a moment I think, haha. I've been trying to get you to access the parents content. Blush
Does this do what you're looking for?

Code:
insert_page_content( page['url'] . "->image" );

(page['slug'] would be the same as page['url'] it would seem)

EDIT:

Oh you beat me to it, haha. Yeah my fault. Glad you got it working! Good stuff!
Reply
Yeh that works thankyou so much! Happy new year!

(2013-01-02, 02:39:21)jason.dixon.email Wrote:
(2013-01-02, 02:14:12)lukastaylor Wrote: Thanks for the continued support.

No problem. Smile

Quote:The code brings back content but from the wrong tab ("Main" not "Image").

Yes I can access the page using the page slug.

Wait... are you looking to get content from child pages displayed on the parent page? I might be having a moment I think, haha. I've been trying to get you to access the parents content. Blush
Does this do what you're looking for?

Code:
insert_page_content( page['url'] . "->image" );

(page['slug'] would be the same as page['url'] it would seem)
Reply
The plugin seems to be knocking out the Custom Title plugin.
Reply
(2013-01-22, 02:20:06)Timbow Wrote: The plugin seems to be knocking out the Custom Title plugin.

Hmm... I'll have a look. Does it just simply stop the Custom Title plugin from working? Or maybe cause errors or something strange?
Reply
Difficult to be 1000% certain but I think it was like this:

I was checking the google ranking of a site I hadn't looked at for weeks and saw it had dropped right off the radar. Looked at the site and saw the custom titles were missing, just getting the sitename plus pagename. Went to write in a custom title in the first page and when I saved I lost the tabbed content. Deleted the custom title and the tabbed content was still missing. Had to restore site from backup. upgraded SIT from 2.1 to 2.2. Tried again to write in a title in Page Options and lost the tabbed content again (I think all except the Main tab). Restored site and uninstalled SIT.
Reply
(2013-01-22, 06:09:58)Timbow Wrote: Difficult to be 1000% certain but I think it was like this:

I was checking the google ranking of a site I hadn't looked at for weeks and saw it had dropped right off the radar. Looked at the site and saw the custom titles were missing, just getting the sitename plus pagename. Went to write in a custom title in the first page and when I saved I lost the tabbed content. Deleted the custom title and the tabbed content was still missing. Had to restore site from backup. upgraded SIT from 2.1 to 2.2. Tried again to write in a title in Page Options and lost the tabbed content again (I think all except the Main tab). Restored site and uninstalled SIT.

Hmm... Is the content gone from your pages "data" XML file?

I think the two plugins might be having a conflict when it comes to saving the file. Will keep looking into it.
Reply
@Timbow

I have not tested any of these 2 plugins, but try this just in case. Edit custom_title.php, find this near the end of the file:

PHP Code:
if (get_magic_quotes_gpc()) {
    
$process = array(&$_POST);
    while (list(
$key$val) = each($process)) {
        foreach (
$val as $k => $v) {
            unset(
$process[$key][$k]);
            if (
is_array($v)) {
                
$process[$key][stripslashes($k)] = $v;
                
$process[] = &$process[$key][stripslashes($k)];
            } else {
                
$process[$key][stripslashes($k)] = stripslashes($v);
            }
        }
    }
    unset(
$process);
}
?>

Remove *all* that code.
Reply
Hmm yeah that is strange. I wonder why the plugin wants to clear all $_POST data. I can't really see a need for it.

Timbow, I think this solution above does solve it. It looks like this plugin might be on some systems (actually works fine on mine heh) accessing the save file first, before Simple Input Tabs does. Then when it does access it, it is "unsetting" (deleting) all the data being sent for saving, so when SIT gets around to storing its data (the tabs content) there is nothing to store. <- May not be entirely accurate.
Reply
(2013-01-23, 21:13:12)jason.dixon.email Wrote: Hmm yeah that is strange. I wonder why the plugin wants to clear all $_POST data. I can't really see a need for it.

It doesn't clear the post data, but strips the slashes if magic quotes is on. But it does so in a strange way - I don't think that the parameters are escaped!?

But code like this does make sense, if you don't want to deal with slashes/magic quotes in your main code - I'm using something like this in some of my plugins (but only in the backend, where I'm sure that all parameters are for my plugin).
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply




Users browsing this thread: 4 Guest(s)