21
Catzwolf
Re: Developers: Say no to IE v6 and stop developing for it.
  • 2010/7/25 5:19

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


@kris: Not exactly sure what you're trying to say here, but out of that % how many of them use ie v6?

@blackrx: And this is where the problem comes from, we the developers, webmasters and other people who run websites need to put out the message that IE v6 is old and we wont be developing for it no more, so go update your browser and make our lifes much easier.

I for one will not be developing for this browser, and actually, I wont be testing on IE 7 either in the future.

So if you want to see website displayed right, then upgrade, simple.




22
Catzwolf
Re: favicon not showing up all the time.
  • 2010/7/25 5:12

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


You need to make sure that you have your icon file within your templates icon/ folder or you will get a blank page.

It could be that the admin template has an fav icon some where, same with the wiki module.

Hope that helps.



23
Catzwolf
Re: xoops 2.4.5 and wfdownloads error
  • 2010/7/25 5:09

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Do you only get this when there are new modifications, or does this happen to you all the time?



24
Catzwolf
Xoops reCaptcha Class v1.00 beta
  • 2010/7/25 4:59

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


What is Xoops reCaptcha?

Xoops reCaptcha is class that will allow users to add and use reCaptcha widget to prevent spam being posted on their website.

This class can be used in conjunction with the Xoops Captcha or it can replace it all together, with just few lines of code.

While this class can be utilized by anyone, it is aim more at Xoops developers wishing to add reCaptcha to their code.

The class is cleanly written and has developer comments to help aid you in it's usage and there is also documentation within the package that will explain how to add the required calls to make it work.

For its usage, you will be required to create a private and public key and these can be entered one of two ways (Again, this is explained in the documentation).

Xoops reCaptcha, can be used in two ways, either within XoopsFormclass or statically through its own API and methods.

There are examples of its usage within the documentation.

Xoops reCaptcha v1.00 is beta and should not be considered ready for a production website, but used to help with further development.

While I have tried to make this as easy to use as possible, it is not for total beginners. If you require help with this class, I am sure people here will only be to glad to help out.

You can download this class from the following:
Xoops reCaptcha v1.00

Please submit bugs and features here:
bugs and feature requests



25
Catzwolf
Re: How to correctly add scripts in your XOOPS theme
  • 2010/7/24 22:02

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


You don't need the full url there, just

Quote:

$xoTheme->addScript('somescript.js');


$xoTheme will add the url automatically for you. :)



26
Catzwolf
Re: Developers: Say no to IE v6 and stop developing for it.
  • 2010/7/24 21:00

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


might be going to far.. but here is some code to stop people with this browser using your site.

var IE6 = (navigator.userAgent.indexOf("MSIE 6")>=0) ? true false;
  if(
IE6){
    $(function(){
        $(
"<div>")
            .
css({
                
'position''absolute',
                
'top''0px',
                
'left''0px',
                
backgroundColor'black',
                
'opacity''0.75',
                
'width''100%',
                
'height': $(window).height(),
                
zIndex5000
            
})
            .
appendTo("body");
           
        $(
"<div><img src='no-ie6.png' alt='' style='float: left;'/><p><br /><strong>Sorry! This page doesn't support Internet Explorer 6.</strong><br /><br />If you'd like to read our content please <a href='http://getfirefox.org'>upgrade your browser</a> .</p>")
            .
css({
                
backgroundColor'white',
                
'top''50%',
                
'left''50%',
                
marginLeft: -210,
                
marginTop: -100,
                
width410,
                
paddingRight10,
                
height200,
                
'position''absolute',
                
zIndex6000
            
})
            .
appendTo("body");
    });       
}



27
Catzwolf
Developers: Say no to IE v6 and stop developing for it.
  • 2010/7/24 20:47

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


This is a personal plea to all Xoops developers, coders and designers, I would like to ask if you would stop developing for this terrible browser, to stop trying to make things that are so broken with it to work by creating hacks, css fixes and other general things that take up more time that could have been spent on more deserving things.

That damn browser is old, out of date and totally useless and yet I still see people pampering to the needs of Microsoft and their unwillingness to actually design a browser that adheres to the standards, like most of the other browser. (Yet IE v9 apparently seems to be heading that way).

Yes I know that there are people that still use this browser and I cannot for the life of me understand why in this day and age with all the other browsers available to download FREE, we are still in the positions to cater for them?

Most of you wouldn't even drive a car that old, so why develop for a browser that old?

It is time to move on, just like we need to move on from PHP 4 and move to PHP 5.

So I say please, stop developing for it, make people aware you won't be developing for it any more and if possible point them in the right direction to a browser that will work properly.

Alternatives to IE

Save the Developers

Germany says No!! Follow their Example!!

Add code to tell your users to upgrade to a new browser

Browser Statistics

Information to think about..

http://secunia.com/advisories/product/11/

IE6 was released in 2001, it's last feature update release was SP2 in August 2004. The current revisions of this browser are now over six years old! In the technology world four years is 2.6 life times! (A lifetime is roughly 18 months, based from Moore's law) IE6 suffers many bugs in terms of Display, Security and Standards Compliance.

http://en.wikipedia.org/wiki/Internet_Explorer_6

Resized Image

Just SAY NO will you!!



28
Catzwolf
Using PHP in smarty templates.. How to do it the easy way.
  • 2010/7/24 20:11

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


When Smarty was first introduced into Xoops, I heard many people say they didn't like it because you can't use PHP directly within the templates. While this is true, there are however a few workarounds that will allow you to basically use PHP native function, as is they are smarty variables.

Lets take one example, the use of sprintf('ba'l, _CONSTANT); is something that developers take advantage of everyday in their code, but there has been times where I really wanted to do this in smarty and yes, you can do it without having to code a new plug-in.

Example:
<{'Hey %s, The time is: %s'|sprintf:$name:$time}>


Smarty has many useful built in smarty function as well, and we can combine both PHP and these functions to help keep our presentation smoother or nicer or more logical, which ever way you want to see it.

Another issue that has bugged me for a long time is having to create select menus in PHP and then added them afterwards. This to me is basically doing the work twice. Here is an example of creating a pull-down select menu in smarty.

First the PHP part:

$myMenu = array( => 'Cats'=> 'wolf'=> 'dog'=> 'mice'=> 'men'=> 'women' );
$xoopsTpl->assign'selected');
$xoopsTpl->assign'mymenu'$myMenu );


Smarty:

http://www.smarty.net/manual/en/language.function.html.options.php

<{html_options name=active id=active onchange=document.myform.submit(); options=$mymenu selected=$selected}>


The end result:
<select size="1" name="active" id="active" onchange="document.myform.submit();">
<
option value="0" selected="selected">Cats</option>
<
option value="1">wolf</option>
<
option value="2">dog</option>
<
option value="4">mice</option>
<
option value="5">men</option>
<
option value="6">women</option>
</
select>


Now here is an example of this, without using $xoopsTpl->assign();

We all know that sometimes we want to do this, but do not have access to the core files or a smarty plug-in to do it. So why not do the whole load from the smarty template (and at this point I just heard Trabis scream NOOOOOO!! lol).

What we need to do is manipulate the smarty variables to add what we want and then we can access the smart variable like any other one.

First we need to tell smarty that we're playing around with PHP and not smarty, so we use the PHP smarty tag

<{php}><{/php}>


Adding out new PHP code and assigning some smarty templates:
<{php}>
    
$this->_tpl_vars['mymenu'] = array( => 'Cats'=> 'wolf'=> 'dog'=> 'mice'=> 'men'=> 'women' );
    
$this->_tpl_vars['selected'] = 1;
<{/
php}>


And the smarty code:
<{html_options name=active id=active onchange=document.myform.submit(); options=$mymenu selected=$selected}>


The nice and most obvious reason to do this is so we don't have to keep redoing it over and over with PHP. Once the template has been created and cached it never gets done again.

So, now you know, you can use PHP in smarty just like others do in Joomla. Yes you can even include PHP files and work from them....

Have fun...

ATB

Catz





29
Catzwolf
Re: Adding custom smarty plug-ins to modules without hacking the core (well almost)
  • 2010/7/24 19:30

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


Quote:

trabis wrote:
Those are great tips, I noticed them in the framework you are working on which is very nice!

I don't see it as a hack, the only issue is accessing the XoopsTpl 'plugins_dir' property which may become protected when we move to php5. Hopefully we will get setter methods for it.

Thank you.


Thanks, I have updated the Xoosla framework since I released XooslaCandy. It does make life a hell of a lot easier having some MVC to work with. I really hate having to do the same things over and over again and this does help :)

I think when the time comes to using 'protected vars and methods in Xoops within xoopstpl, then there really should be the mechanics for doing this in a proper manner. Really should have been done a long time ago.



30
Catzwolf
Re: Mymenus 1.0 alpha available on Xuups SVN
  • 2010/7/24 16:11

  • Catzwolf

  • Home away from home

  • Posts: 1392

  • Since: 2007/9/30


I haven't had time to have a look at this, but you beat me to the punch with this :)

Thanks, I will be testing it out for my new site once I get most of the work done that I am doing.

Keep up the good work :)




TopTop
« 1 2 (3) 4 5 6 ... 185 »



Login

Username:
Password:

Lost Password? Register now!

Who's Online

66 user(s) are online (51 user(s) are browsing Support Forums)


Members: 0


Guests: 66


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits