Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple Input Tabs
(2013-09-19, 01:30:55)villeristi Wrote: Hi!

There seems to problem if I try to include SIT to template-files.
for example, my template.php says:

PHP Code:
require('tplfile.php'): 

And my tplfile.php says:
PHP Code:
insert_page_content();
insert_page_content('someArea'); 

Any info about this...?

I'm not entirely sure I understand. Are you able to elaborate just a little bit more? Smile
Reply
(2013-09-19, 06:56:39)jason.dixon.email Wrote: I'm not entirely sure I understand. Are you able to elaborate just a little bit more? Smile

Heh, I'll try my best...

Theme's template.php file (just to keep it simple):

PHP Code:
include('tpl/header.php');
include(
'tpl/page.php');
include(
'tpl/footer.php'); 

In header.php and footer.php just basic html-stuff (not relevant to this).

In page.php where I try to insert content w/

PHP Code:
insert_page_content(); 

and

PHP Code:
insert_page_content('someContentBlock'); 

the "someContentBlock" doesn't show in backend editor and in front-end.

So it doesn't work (for me at least) this way.

Huh
Reply
(2013-09-19, 08:13:23)villeristi Wrote: So it doesn't work (for me at least) this way.

Huh

Right I get ya. Smile

Hmm... it should work in theory. I'll have to do some tests. Three questions I have for you are:

If you were to turn off the plugin, and use the normal get_page_content(); tag. Does the page content show up?

You mentioned that insert_page_content('someContentBlock'); isn't working. Is insert_page_content(); working?

How urgent is it? Hopefully this can be fixed as quickly as it can. However I'll be away for a week starting this saturday. (you can of course email me directly too jason.dixon.email@gmail if you like, otherwise the forum here emails too).
Reply
(2013-09-19, 16:46:28)jason.dixon.email Wrote: If you were to turn off the plugin, and use the normal get_page_content(); tag. Does the page content show up?

Yup, it's working.

(2013-09-19, 16:46:28)jason.dixon.email Wrote: You mentioned that insert_page_content('someContentBlock'); isn't working. Is insert_page_content(); working?

Yup, insert_page_content(); is working, insert_page_content('someContentBlock'); is not.

(2013-09-19, 16:46:28)jason.dixon.email Wrote: How urgent is it? Hopefully this can be fixed as quickly as it can. However I'll be away for a week starting this saturday. (you can of course email me directly too jason.dixon.email@gmail if you like, otherwise the forum here emails too).

Heh, not urgent. I just don't use includes for now. If you manage to get it working, bravo, but if you don't, it's not the end of the world. If you like some sort of additional info, you can also email me @ villeristimaki(a)gmail.com.

Cheers!
Reply
I find this plugin extremely useful but lately I can't seem to get it to work. I've even tried using it on a fresh install of GS (3.2.3) without any other plugins/themes installed and end up with the same result. Is anyone else having this problem? I've changed get_page_content to insert_page_content in the Default Innovation template.php file and this is what I see just below the Page Title field when I try to edit a page, I am unable to save anything:
Code:
Warning: key() [function.key]: Passed variable is not an array or object in /public_html/plugins/simple_input_tabs.php on line 660

Warning: key() [function.key]: Passed variable is not an array or object in /public_html/plugins/simple_input_tabs.php on line 660

Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /public_html/plugins/simple_input_tabs.php on line 533
Reply
Aww man thats odd. Confused

I'll look into it. Have you tried other templates or just making a simple HTML page yourself?

Though you've already tried a fresh install... hmm...
Reply
(2014-01-17, 13:18:21)jason.dixon.email Wrote: Have you tried other templates or just making a simple HTML page yourself?

Yep, I tried it in my custom template like I normally would and ended up with the same error. After troubleshooting (I figured it was a conflict with another plugin) I tried a fresh install with the default template and removed all other plugins except SIT/SPT but had the same result. I've used it many times before, not sure what I could be doing wrong...
Reply
Yeah thats really confusing. I just did a fresh install now leaving everything at default (except turning on Debug mode). Changed get_page_content to insert_page_content. All works fine without a hitch. :S

I've tried misspelling insert_page_content which just causes different errors. So it isn't that. Not that I don't trust you spelt it right of course... Tongue

Hmm...

Have you had any other issues with other plugins?
Reply
(2014-01-18, 00:08:41)jason.dixon.email Wrote: Have you had any other issues with other plugins?

Nope, just this one. As soon as I enable the plugin, I get the error. Would it help if I provided you with access to take a peek? I'm stumped and really need this functionality...
Reply
(2014-01-18, 05:29:35)bensayers Wrote:
(2014-01-18, 00:08:41)jason.dixon.email Wrote: Have you had any other issues with other plugins?

Nope, just this one. As soon as I enable the plugin, I get the error. Would it help if I provided you with access to take a peek? I'm stumped and really need this functionality...

I'm quite confused too. It wouldn't hurt to have a look. My email is: jason.dixon.email@gmail.com
Reply
Alright. Woo!

Updated to version 2.4.

Fixed the issue. json_decode doing some strange things... Also should be compatible with the current version of Get Simple.
Reply
Hey jason,

I ran into a problem today when trying to update some content in my webspace: I use GS 3.3.1 and Simple Input Tabs 2.4, Small Plugin Toolkit 1.4.
On my hosted webserver, the Input Tabs are no longer shown in the backend and so I have a problem accessing the page content in those Tabs.
I use 3 Tabs, a header (default), a gallery and a footer.
I have the latest i18n installed and everything seems to be working on the frontend, but I have to download the .xml pages and edit by hand to change contents.

Does that ring any bell? Any I idea what I could look for? I tried different browsers too...
It still works just fine on my local install of the site with exactly the same Theme/Scripts etc.

Thank you very much! Love the Plugin when it works ;-)

Cheers,

Tom
Reply
It just occurred to me to enable debugging - and sure enough there it is:

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in .../plugins/simple_input_tabs.php on line 672 Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in .../plugins/simple_input_tabs.php on line 672 Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in .../plugins/simple_input_tabs.php on line 672

Can't see any invalid characters there - my fields are called:
<?php insert_page_content(); ?>
<?php insert_page_content("gallery"); ?>
<?php insert_page_content("afterword"); ?>

BTW. I only see the magnifier glass tab, not any other.

Edit: More info: my local UwAmp uses PHP 5.4.15, my webhoster uses 5.5.11. Health check is all green in both.

Cheers,

Tom
Reply
(2014-04-12, 21:10:57)Thomas Helzle Wrote: It just occurred to me to enable debugging - and sure enough there it is:

Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in .../plugins/simple_input_tabs.php on line 672 Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in .../plugins/simple_input_tabs.php on line 672 Warning: preg_match(): Compilation failed: invalid range in character class at offset 7 in .../plugins/simple_input_tabs.php on line 672

Can't see any invalid characters there - my fields are called:
<?php insert_page_content(); ?>
<?php insert_page_content("gallery"); ?>
<?php insert_page_content("afterword"); ?>

BTW. I only see the magnifier glass tab, not any other.

Edit: More info: my local UwAmp uses PHP 5.4.15, my webhoster uses 5.5.11. Health check is all green in both.

Cheers,

Tom

Yeah that is really odd... And it's working on your local machine?

Are you able to email me your theme page so I can see if I can get the same error? Weird.

email is username @gmail.com

In the meantime you should be good to delete that line out of the script if you really want to.
All that line does is to ensure you can't use tab names with weird characters... and... you're not. Smile
Reply
Thank you very much jason!
I'll test commenting out that line tomorrow. I sent you a mail with my template.

Cheers!

Tom
Reply
Just to follow up on this in case somebody else should run into the same problem:
Jason helped me via email very quickly and it turned out that a single slash was the issue:

----------------------------------------------------------------------------
On the line that has the issue 672:

> if(!preg_match('/^[\w_-\s]+$/',$tab)){$SIT_WARNING = 2; $ok=false;}// Tab has invalid characters?

There might be an issue with some PHP versions with the - character. Apparently a solution is to escape it, like so \-
So the line would end up looking like this:

> if(!preg_match('/^[\w_\-\s]+$/',$tab)){$SIT_WARNING = 2; $ok=false;}// Tab has invalid characters?
-----------------------------------------------------------------------------

Thank you so much Jason!

Cheers,

Tom
Reply
What is the difference between this plugin and the i18n custom fields plugin?

(Besides custom fields offering various content types and simple input tabs only the WYSWIG type and custom fields appearing in the page options fold out and simple input tabs as tabs in replacement of the standard single content area).
Reply
The great great great beautiful difference is that this plugin allows to add different number of sections for different pages, and makes it very easy for the non technical end user to access and use.
More at the point:
If we need 3 boxes for the 1st page
- with I18n custom fields, we create 3 customfields (box1, box2, box3) that WILL be present on all website pages, even if, on the rest of the pages we do not need those fields

If on another page, ... Team page, for example, we need other 4 boxes with team members descriptions, with I18n we will need to add another 4 custom fields, that will allso apear to all pages, including first page.
And so on, with custom fields we will end up having lots of fields on every page, that we do not use or need.

So, this great idea plugin, Simple Input Tabs, will only add the needed sections on a particular page, without interfering with other pages.

Actualy, if I18n custom fields could be set to have different fields for different pages, would behave the same as this plugin.

Hope that helped.
Reply
Wow that is high praise, Tazmandev. Smile

But yeah you more or less nailed the differences, danielg and Taz. If you're looking to create very specific content constraints, custom fields is for you.

Simple Input Tabs on the other hand is made to be a little simpler and more automatic. Both for the template creator and hopefully the end user as well.
Reply
(2014-07-08, 21:10:01)tazmandev Wrote: Actualy, if I18n custom fields could be set to have different fields for different pages, would behave the same as this plugin.

That's what I18N Special Pages does. It also makes the fields searchable and allows you define how the page is displayed and how the page is displayed within a search result list.
I18N, I18N Search, I18N Gallery, I18N Special Pages - essential plugins for multi-language sites.
Reply
Thanks, I understood the difference. I had also discovered I18N special pages in the meantime.
Reply
Full Russian translation for the Simple Input Tabs plugin.
Russian language for Simple Input Tabs 2.6
Reply
(2015-02-15, 07:15:04)St_brat Wrote: Full Russian translation for the Simple Input Tabs plugin.
Russian language for Simple Input Tabs 2.6

Awesome. Thanks St-Brat. Smile

Added it to the project, here:
https://github.com/internetimagery/simple_input_tabs
Reply
(2015-02-15, 08:26:20)jason.dixon.email Wrote: .....
Awesome. Thanks St-Brat. Smile

Added it to the project, here:
https://github.com/internetimagery/simple_input_tabs
Greetings, dear jason.dixon.email! Users in Russia like your plugin.
However there is a problem which I can't solve Huh. There is a way names Tabs in the admin panel to make Cyrillic letters?
Thank you in advance for your reply.
Reply
I added your plugin to the Plugin-guide in the wiki. Feel free to add a better description.
Reply




Users browsing this thread: 5 Guest(s)