How to make Checklist Items on Mediawiki? - checkbox

Hello I am using a Mediawiki install on my dev server, just to organize my thoughts, write documentation for my apps, make note files/pages for general topics for easy reference, and so much more. A personal wiki can be so useful for programmers/coders/etc..
I have a wiki page that is a To-Do list for a project with multiple items, it would be really awesome if there was a way to add checkboxes next to my list items in mediawiki, and then upon checking them, either make the item striked through (line through it) or make the check box remain checked, upon revisiting the page at later dates.
Does anyone know if there is a Plugin for media wiki that does this or something like this? Or if it is even possible to do something like this with just a plugin?
Please any ideas or suggestions on how to accomplish this or similar capability with a media wiki install (same code used for wikipedia)
Thanks for help, ideas, etc..

This renders a nice list of checkboxes:
== My Wiki Header ==
Here's an example checklist:
<html>
<input type="checkbox"> Item A.<br>
<input type="checkbox"> Item B.<br>
<input type="checkbox"> Item C.<br>
</html>
Of course the checkboxes won't do anything, they're just for the looks.

First, you would need to install Extension:Widgets. Then, you can install the Google Gadget Widget. Then, you can lastly pick from your choice of to-do list type gadgets here.

Related

Dotvvm multiselect business pack filtering backspace doesn't work

I Used component from Business pack called MultiSelect viz code:
<bp:MultiSelect DataSource="{value: UserRoleGroupNames}" SelectedValues="{value: UserDetailDTO.UserRoleGroupNames}" Placeholder="Vyberte uživatelské role" class="form-control"/>
Everything looks good expect filtering. I cant delete letters with backspace key.
Thank you! I've been able to repro this issue. It will be fixed in next release.

blogger - filtering archive list widget by labels

I have made a blogger site for a friend. She wanted 2 blogs on the one site which I managed to achieve using search and labels.
http://thewishingtreeandotherdreams.blogspot.co.nz/search/label/moon
http://thewishingtreeandotherdreams.blogspot.co.nz/search/label/blog
Now what I want to do is also filter the archive widget based on the above labels.
I know I will have to have a second archive widget so one shows only "moon" labeled posts and the other only shows "blog" labeled posts
My programming knowledge however is VERY limited. Has anyone else already done this. Do you have code you could share with me?
Here's a script with similar functionality but not include nesting by dates. Only copy and edit the next code into new HTML/JavaScript widget.
<script src="http://cloud.github.com/downloads/jhwilson/Create-a-Blogger-archive-page/Make-Blogger-Archive-Page.js"></script>
<script src="http://NAME_OF_YOUR_BLOG.blogspot.com/feeds/posts/default/-/LABEL_NAME?max-results=500&alt=json-in-script&callback=LoadTheArchive"></script>
If adds some CSS could be look better.

Dropdown dependents agile toolkit

Hello friends a pleasure to be around here, I'm new to this framework and I have a few doubts about how to make dependent dropdown, for example, I have a list of countries and select a country to show me their states hope I can help from already thank you very much.
Here is a demo of what you're looking for:
http://demo39.agiletoolkit.org/demo.html?t=20
Could it be that above example (http://demo39.agiletoolkit.org/demo.html?t=20)
only works when the arrays have numbers for their dropdown values? ie:
$country_list=array(1=>'Country1', 2=>'Country2')
$state_list=array(1=>array('st1','st2'),2=>array('st3')
night it be the demo will not work when using:
$country_list=array('COUNTRY1'=>'Country1','COUNTRY2'=>'Country2')
$state_list=array('COUNTRY1'=>array('ST1'=>'st1','ST2'=>'st2'),'COUNTRY2'=>array('ST3'=>'st3')
with the second setup I get an error at form submit time saying:
Value 'ST3' is not one of the offered values
or am I doing something else wrong? should I (not) use stickyGET for instance?

How to add a custom field into template.php using Zen sub theme

First time poster here, I'm a designer not skilled at all with php and I have a small issue I don't seem to be able to solve. I'm making a site in drupal 7 using a sub theme on zen.
Btw this is a great CMS, even though people say it's really more a developers CMS. I have no trouble to do what I need using views, rules, display suite etc. So a big thank you for all the developers out there making this such a good CMS. But for this apparently simple problem... no module will help me (I think) and I'm kinda stuck.
So here it is: I'd like to add a subtitle next to the title in all my pages.
So what I did was to add a custom field into the content type basic page (machine name: field_sub_title) which is a simple text field.
I uncommented the following line in my template.php
function mytheme_preprocess_page(&$variables, $hook) {
$variables['sub_title'] = t('field_sub_title');
}
Now my question is how do I load the content of my custom field into that variable?
I know i need to change the second part, but I don't have a clue as into what I need to change this.
Displaying the variable into the the page.tpl.php is something I know about so I only need help with the first part.
{EDIT}
Ok I found how to do this :)
I was looking for a solution in the wrong place. I don't need to change any thing in the template.php file.
Just needed to add this bit of code into my page.tpl.php:
<?php
print $node->field_sub_title['und'][0]['value'];
?>
So I'm posting this here for other Drupal newbies struggling with this....
Your solution may work for now, but there may be a more Drupal-y way to handle a problem like this. If you haven't noticed any problems yet, you may find one or more of the following issues down the road:
Someone who doesn't know php or Drupal theming may need to change the way this works.
If you're like me, you may forget where exactly in code this was implemented.
You may see superfluous markup and/or errors on nodes (content) that do not have this sub-title field (ie. event content not having a sub-title field while basic pages and news articles do).
When you add a field to a content type, it will automatically appear anytime content in that content type is displayed. You should be able to add the sub-title field for your page, event or whatever else you need and have it automatically appear in the markup.
You can 'manage display' of a content type to drag and drop the order for fields to appear. You could take it a step further by using a module like Display Suite to add formatting or layout per-content type.
If you feel like this isn't good enough and the markup for the subtitle must be at the same level as the page title (which is rare), at least add an if statement to make your code check to see if the variable is present before trying to print it. I'd also add a new variable and comments for code readability.
<?php
$subtitle = $node->field_sub_title['und'][0]['value'];
if($subtitle){
print $subtitle;
}
?>
Consider using field_get_items or field_view_value, or at least use the LANGUAGE_NONE constant instead of 'und'
See https://api.drupal.org/api/drupal/modules%21field%21field.module/function/field_get_items/7 and https://api.drupal.org/api/drupal/modules!field!field.module/function/field_view_value/7
This has the added benefit of reducing the number of potential security holes you create.

Plus One Button not traversing the dom to grab snippet data

It has been stated that the google plus-one button works it's way up the dom hierarchy when it is looking for microdata to set the +snippets information for sharing (Jenny Murphy said this at Google+ +1 Button Snippet+ Problem ). Also, the documentation on the +Snippets site from google at https://developers.google.com/+/plugins/+1button/#plus-snippet states "If the page is annotated with schema.org microdata, the +Snippet will use the name, image, and description properties found on any schema.org type". However, it doesn't appear that this is truly the case in some conditions.
We have a test page at http://www.magnetstreet.com/stores/html/weddings/testPage.html where it is demonstrating a very simple product page which has been marked up with schema.org microdata. This page passes w3c validation and its microdata is parsed properly in Googles rich snippets testing tool. However, when the +1 button is clicked and you proceed to share it, the api is clearly ignoring the itemprops set inside the product tag. This can be seen by how "page title" is displayed instead of "product title" which is the itemprop name.
Does anyone see any obvious issues with this code?
I would like to note, if we only have microdata properties set on the Product div and within (no itemscope or itemtypes on any outer elements), then the button works as expected. However, We have data on much more complex pages that need the other microdata, so removing all other microdata besides the product is not a solution.
There is an ongoing discussion I'm having with Jenny Murphy about this at https://groups.google.com/forum/#!topic/google-plus-developers/MvuZtu8prTo . In short, currently the +1 button only looks at the outermost itemscope for the snippet information. If it doesn't find it there, it stops parsing through microdata and instead looks for other ways to gather snippet info.
In the discussion I linked to, I've described why I think this can be a problem and am hoping to start some good dialog about it.

Resources