i have the test Componente "Hello Wolrd".
I want this Code, to embed in Joomla.
<?php
if(isset($_POST['submit']))
{
echo "Auf Button gedrückt";
}
else
{
?>
<form action="test.php" method="POST">
<input type="submit" id="submit" name="submit" />
</form>
<?php
}
?>
How do I put this on?
Thanks, for your Help
you want to add functionality in joomla. All you have to do is start from joomla documentation.If you wanted to make a component like this then this tutorial is what you want -
http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Developing_a_Basic_Component
It's better to develop component in mvc format, because then you will be able to modify other joomla components/third party components as joomla is now in MVC format.
Find more tutorial on component/module development by google.com.That's all what you need to get started
Related
Lets say I have a model with 2 fields. With one field being a choice field of radio button Choice1, Choice2 and Other, the next being Other which is a textfield I want the "other" textbox to appar / enabled only when "Other" is selected in the radio button.
This question is not from the django-forms category. This applies more to the front-end category. Everything that is sent from the django server is static. Sure, you can write a form class and override the template for it. Also, you can connect the js script directly to the form class. It is convenient, but not canonical. Just, write the JS script or using JQuery, which will activate the field when you select a particular option.
I wrote for you a small example of how this can be do it.
I hope this helps you.
$('input[type=radio][name=choices]').change(function() {
$('input[type=text][name=other]').prop(
'disabled',
function(i, v) {
return !v;
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<form>
<p><input name="choices" type="radio" value="choice1">Choice 1</p>
<p><input name="choices" type="radio" value="choice2">Choice 2</p>
<p><input name="other" type="text" disabled></p>
</form>
i try to scrape a website, for choosing every Category, i need to check a check box
<ul class="mvSrcLk">
<li>
<label class="mvNavSel mvNavLvl1">
Marché frais
<input type="checkbox" value="f/1/1p" name="selectedNavigationCategoryPath">
</label>
</li>
<li>
<label class="mvNavSel mvNavLvl1">
Épicerie sucrée
<input type="checkbox" value="f/1/1o" name="selectedNavigationCategoryPath">
</label>
how can do this by Scrapy, i read this but it doesn't helped me
Is the code part of a <form>? If so then you may need to make a request with the "check box selected", as well as anything else required for the form submission, and then scrape what you need from that request.
If however, the checkbox executes some sort of Javascript that changes the HTML content dynamically, then you'll need to use other tools in combination with Scrapy. There are projects that combine Scrapy and Selenium or Splash that should execute Javascript and return the response.
References
Scraping dynamic content using python-Scrapy
selenium with scrapy for dynamic page
I'm new to ember.js and I find it pretty confusing to figure out which is a good way for authentication (version 2.x) since most of the examples on the web seem to be outdated. Also the documentation often doesn't come with easy to understand beginner examples.
Right now I'm following this tutorial. The initializer works apparently, I can also trigger the action login but then it gets stuck on the controller.get bit. The console spits out a TypeError: controller.get(...) is undefinedTypeError: controller.get(...) is undefined.
app/components/login-form
...
actions: {
login: function() {
var controller = this;
controller.get("session").login().then(function(admin) {
// Persist your users details.
}, function() {
// User rejected authentication request
});
}
}
...
app/templates/components/login-form
<form {{action 'login' on='submit'}}>
<div class="form-group">
<label for="email">Login</label>
{{input value=email placeholder='Enter Login' class='form-control'}}
</div>
<div class="form-group">
<label for="password">Password</label>
{{input value=password placeholder='Enter Password' class='form-control' type='password'}}
</div>
<button type="submit" class="btn btn-default">Login</button>
</form>
app/templates/admin.hbs
<div class="page-header">
<h1>Login</h1>
</div>
{{login-form}}
I hope somebody can point me into the right direction to get this working. I'd also appreciate any general advice where to find good examples or explanations concerning the ember 2.x way of authentication.
Edit: I need to have this working with Firebase.
http://ember-simple-auth.com/
looks like your best bet. They have a good video on setting it up too.
For connection to firebase you could create backend to authenticated with and have that check firebase. I'm using express and jwt in node.js to communicate with my mongoDB database.
When working with Coldfusion 9 and cfform with a HTML format, I place a cfinput on a page with a label, it displays the label to the right of the text box. I have tried using the tag, with and without it but no matter what I do, the label is always to the right of the box.
<cfform method="post" name="mfForm" >
<label for="campaign">Mailfile ID:</label>
<cfinput type="text" name="campaign" id="campaign">
<cfinput type="submit" name="submit" value="Submit" id="submit">
</cfform>
Don't ever remember having this problem before recently. I would just use an HTML form, but want to take advantage of cf's autosuggest.
I hate to say it, but frankly quirks like this are why many people suggest ditching the built-in ajax features and using the underlying libraries (or some jQuery alternative) directly. You will have greater control, more choices, not to mention you will not be tied to whatever version ships with ColdFusion. Most of these libraries are updated frequently, so within a year the ones bundled with CF are often out of date. ExtJS is a good example. The public version is already up to version 4.2.1, but CF9 still uses 3.1.0.
Anyway, getting back to your question ... if you do a view source you will see CF generates several div tags, one of which contains the style="float:left" directive, which could explain the behavior you are seeing.
I did a quick search and happened upon a note in the the CF8 docs which suggest a hack for datefields which may also apply here:
To correctly display label text next to the control in both Internet Explorer and Firefox, you must surround the label text in a
<div style="float:left;"> tag and put three <br> tags between each
line.
Simply adding the div seems to work for me with the sample you posted:
<cfform method="post" name="mfForm" >
<div style="float:left;">
<label for="campaign">Mailfile ID:</label>
</div>
<cfinput type="text" name="campaign" id="campaign" autosuggest="AA,BBB,CCC,DDD">
<cfinput type="submit" name="submit" value="Submit" id="submit">
</cfform>
But again, you might want to consider using the javascript libraries directly instead of relying on the built-in ajax features, so you can avoid weirdness like this.
Does anyone know how to integrate this wordcount plugin with the existing django-ckeditor apps? Either https://github.com/dwaiter/django-ckeditor or https://github.com/shaunsephton/django-ckeditor/.
Specifically, I'm stuck at Step 4
For your CKEditor instance, use the following HTML markup (content can be any element name you wish, so long as the hidden field has its element name in the format elementWordCount)
<label for="content">Content</label>
<textarea class="ckeditor" name="content"></textarea>
<input name="contentWordCount" type="hidden" value="250" />
Where do I insert that Input element?
I'm using the widget btw.
Alternative solutions to having a wordcount plugin are welcome.
I'm the author of https://github.com/shaunsephton/django-ckeditor/.
I've just updated the repo to support widget template customization.
You should now be able to integrate the wordcount plugin by specifying it as part of the CKEDITOR_CONFIGS setting:
CKEDITOR_CONFIGS = {
'default': {
'extraPlugins': 'wordcount',
}
}
and then overriding the ckeditor/widget.html template to look like this:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>
<input name="contentWordCount" type="hidden" value="250" />
<textarea{{ final_attrs|safe }}>{{ value }}</textarea>
<script type="text/javascript">
CKEDITOR.replace("{{ id }}", {{ config|safe }});
</script>
I've loaded jQuery here through Google APIs just as an example.