BlogEngine.net Comments Remove Email Requirement - blogengine.net

I can't see the point of making an email address mandatory for people posting comments when they can make up a dummy address. How do I remove it?

The /User controls/CommentView.ascx user control is responsible for validating comments. If you remove the following line it will no longer be required.
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtEmail" ErrorMessage="<%$Resources:labels, required %>" Display="dynamic" ValidationGroup="AddComment" />
I would recommend you verify with whatever backend you are using that leaving that value out will not break any other functionality. One thing I know relies on the email address is the gravatar code so you should probably check it as well.

This is a really interesting and informative post. Good job! keep it up, hope to read your other updates. Thanks for this nice sharing
taxi in doha
taxi in doha qatar

Related

Insert not showing in Magento order e-mail

When a registered customer, for example "Armin van Buuren", places an order, he gets an email with "Hello Armin Buuren". That should be "Hello Armin van Buuren". Strange thing is when he would order something as a not registered user, so he don't make an account, the name in the e-mail is displayed correctly as "Hello Armin van Buuren".
In the order_new.html for registered users, the name is generated with:
Hello, {{htmlescape var=$order.getCustomerName()}}
In the order_new_guest.html for not registered customers, the name is generated with:
Hello, {{htmlescape var=$order.getBillingAddress().getName()}}
Already tried to use the guest html, but that doesn't displays the name correctly. It shows the name with the prefix, but that's not correct. It should be like "Hello, [NAME] [INSERT] [SURNAME]". Also searched on internet for this, but is seems that I am the only one with this problems?
If you know a possible solution, or what I should do or try, please let me know!
Thank you!
I edited the Magento settings to don't display the middle initial form, and then edited every customer to put the insert in the surname. I think that's the best option.
Thanks for the help guys!

Magento contact form customizations

I'm trying to add a couple fields to the contact form so that my customers can indicate the year make and model of their vehicle when writing.
I have just upgraded my Magento installation from 1.4.3 to 1.7.0.1. My previous contact form was a hack job and this time I'm trying to get it working the right way. Reading all around, I tried adding <input type="text" size="15" value="" id="model_ext" name="bike_model_ext" class="required-entry input-text"> to the form.phtml in my template and then in the transaction email template in admin, {{var data.model_ext}}. But that doesn't work. I ensured that the template in the back end is correct by manipulating the text. I also know the form.phtml is correct, as I see elements when they change.
So then I overloaded the controller handling the contact form. I confirmed my controller is handling it (it came with a echo "it works"; die();) And in there, I'm looking for the POST data of the extra form element names, but here, too, I'm having troubles getting access to the data. Looking around the net, I tried this:
$comment = $this->getRequest()->getPost('comment');
$extras=Array( "year","make","model","model_ext" );
foreach($extras as $field)
$comment .= "\n$field:\t".$this->getRequest()->getPost($field);
$this->getRequest()->setParam('comment', $comment);
parent::postAction();
But again, it is like my variables do not exist. Here, again, I know my code is being executed, because when I get anything wrong in there, the contact form crashes to an error message.
I'll be on it again in the morning, but hope that there is something easy I'm missing that someone here with more experience can help me with.
EDIT: ANSWERED I was using the ID to key in for the variables, needs to instead be the name.
An answer for those interested by this fix.
The $_POST and $_GET value generated by a form use name and not id.
In this situation you have to use bike_model_ext instead of model_ext.
Kind Regards,

Magento, add a custom attribute to a customer address

I'm looking for a way to add a drop down for a customer's address (during registration, editing, checkout, etc..) that indicates whether or not it is a Residential or Business address. I have spent hours going through tutorials but they are all out of date or poorly written. I have read 6 different ones telling me how to do the same thing 6 different ways. Can someone outline a simple process that you need to do in order to add a custom attribute to an address? I'm on Magento 1.6
Try something like this tutorial at Fontis: Know More About Your Customers - Adding Custom Signup Attributes
Whilst this was written for 1.3.2.4, most (if not all) is still relevant for 1.6. I've done a very similar thing by allowing a customer to choose the customer group they wish to belong to, by following these directions.
Oh, and there are some great comments on the post as well.
These tutorials should give you a good idea how to do what you want:
http://www.unexpectedit.com/magento/add-new-customer-attribute-onepage-magento-checkout
http://www.excellencemagentoblog.com/magento-adding-custom-field-to-customer-address
Best regards

Displaying specific content to specific user in Joomla 1.5

To be short, It's a website for an investigations lab.
I need to display specific content (lab report) to specific user. Users will be given a username and a password when leaving and will be asked to login on the website to access his/her report with the credentials given to him.
So , it's a "specific content" for "specific user" - Moving to 1.6 is not an option.
I have a solution in mind but involve a lot of core hacking and will take some time ... If any one been in a similar situation or have an idea in mind I would appreciate your help.
Ok, this can be done but it's going to take a little trickery to get there. First, you are going to need a way to post the lab reports and associate them with a user. I would use K2 for this since you can add the report as an attachment to an item. You can also add extra fields to K2, which would be the next step. You'll need an extra field where you can enter a user ID number that you will use to determine if a user is allowed to view the content.
There are several steps you will need to take to now filter the content so only the associated user can see it.
You will need to get the user ID once the user is logged in:
$user =& JFactory::getUser();
$usr_id = $user->get('id');
You'll need a menu item that links to a K2 Category where all the lab reports go.
You'll need a subtemplate with a modified category_item.php for that category that only displays the associate reports:
if($this->item->extra_fields[USER_ID_EXTRA_FIELD_NAME]==$usr_id){
all the category item stuff
}
You'll need a subtemplate with a modified item.php for the category that again blocks users other than the associated user, basically the same code as #3 to either display the content or an error message.
The only other way I can think of that you can accomplish this would be to use an ACL component with a group for each user.
The K2 method with subtemplates would not require any core hacks and will work with a little work.
You can achieve what you want with Flexicontent http://www.flexicontent.org/ and Flexiaccess
Flexicontent is a K2 type component and I use them interchangeably. With Flexiaccess you can create items that are only available to certain users.
No hacks required.
Bad News: That cant be done with standard Joomla 1.5 (without hacking)
Good News: You can use one of the free or commercial Extensions for Joomla to accomplish that. I would suggest for example:
Admin-User-Access
http://extensions.joomla.org/extensions/access-a-security/backend-a-full-access-control/9040
Or you can search for yourself:
http://extensions.joomla.org/extensions/access-a-security/backend-a-full-access-control

Wordpress: How do I convert a generated URL (permalink) to a pretty URL?

In a plugin, I am generating a paginated link to a category,
i.e. http://localhost/?cat=17&paged=5. The category is known by slug and id.
Is there a way to have this URL converted to the user defined "nice permalink" format,
i.e. http://localhost/category/foo/page/5?
(Assuming we're running Wordpress 2.8/2.9+)
Edit: Since there are some misunderstandings about what I'm trying to achieve, here's what I have:
The category ID
The page number (i.e. the fifth page of that category's archive)
With these data I can create the URL to that page, which would be, for example, http://localhost/?cat=17&paged=5, and that works well. The problem is of a visual nature: If the user has pretty permalinks enabled, then this won't fit in very well.
Question is: How do I get the correct, pretty permalink (i.e. http://localhost/category/foo/page/5) from (or for) the information I have?
Edit 2: Obviously if a user has pretty permalinks disabled, then there are no pretty permalinks. I know that, and that is really not subject of the question ... For the moment, let's just assume the user has an arbitrary permalink setting. I generate a link, and it should look like the user wants it to.
Have you looked at the WP_Rewrite?
Does All In One SEO meet your requirements? I actually bought the "pro" version for like $30 USD and it was well worth it.
My Wordpress installation (2.9.2) does this automatically - canonical URLs have been built into Wordpress for some time. Maybe your plugin is disabling this feature?
I'm guessing you already figured it out but I just wanted to put this out for others. I think I understand your situation. If I've read your question correctly, changing admin permalink settings does not apply.
You can get the category ID then use get_category_link() function to get the 'pretty' permalink. Then append the pagination to the end.
You could explode the permalink to get the category ID and pagination number, then use the step above to put it together.
Is this what you were looking for?
The correct way to generate the link would be to use get_category_link and add_query_arg
In your example, the following would work:
$category_link = add_query_arg( array('paged' => 5), get_category_link($category->term_id));
This will generate the URL and Wordpress will redirect to the correct page.
check this page out, it explains pretty permalinks pretty good.
http://codex.wordpress.org/Using_Permalinks
You should find these settings in
Wordpress->Settings->Permalinks
I think
/%category%/%postname%
in the direction what you want
You can also try to redirect your url using htaccess, here are some examples:
[http://]perishablepress.com/press/2008/02/06/permalink-evolution-customize-and-optimize-your-dated-wordpress-permalinks/
Sorry darf bis jetzt nur ein link posten pfft... :-(
kind regards,
Mahatmanich

Resources