21
playsome
Re: Xoops Form styles
  • 2012/8/13 15:44

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi Mamba,

thanks for the link to the tutorial, I think that will be useful for me also. Bookmarked.

Cheers.



22
playsome
Re: Xoops Form styles
  • 2012/8/13 13:11

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi deka,

if the <table class="outer"> is hardcoded into the php file you would need to edit the core file to remove the table and include divs instead, theres probably no other way to do it.

If you need to just style form elements i.e. inputs, text areas, buttons, etc then I believe all xoops form element styles are in /xoops.css

Of course no html should be in a php file, especially not when xoops has a templating system, it kinds of defeats the purpose of using templates.

Hopefully in the next major release core team will remove all html from php files and hopefully module devs will folow suit.

Ive edited themeform.php for you and removed table, tr, td, th and replaced with divs. i havent tested it or anything.

code is from line 63 to line 106

function render()
    {
        
$ele_name $this->getName();
        
$ret '<form name="' $ele_name '" id="' $ele_name '" action="' $this->getAction() . '" method="' $this->getMethod() . '" onsubmit="return xoopsFormValidate_' $ele_name '();"' $this->getExtra() . '>
            <div class="tableWrap">
            <div class="tableTitle"><span>' 
$this->getTitle() . '</span></div>
        '
;
        
$hidden '';
        
$class 'even';
        foreach (
$this->getElements() as $ele) {
            if (!
is_object($ele)) {
                
$ret .= $ele;
            } else if (!
$ele->isHidden()) {
                if (!
$ele->getNocolspan()) {
                    
$ret .= '<div class="tableInner"><div class="head">';
                    if ((
$caption $ele->getCaption()) != '') {
                        
$ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' '') . '">';
                        
$ret .= '<span class="caption-text">' $caption '</span>';
                        
$ret .= '<span class="caption-marker">*</span>';
                        
$ret .= '</div>';
                    }
                    if ((
$desc $ele->getDescription()) != '') {
                        
$ret .= '<div class="xoops-form-element-help">' $desc '</div>';
                    }
                    
$ret .= '</div><div class="' $class '">' $ele->render() . '</div></div>' NWLINE//this is possibley where it adds odd/even class?
                
} else {
                    
$ret .= '<div><div class="head">';
                    if ((
$caption $ele->getCaption()) != '') {
                        
$ret .= '<div class="xoops-form-element-caption' . ($ele->isRequired() ? '-required' '') . '">';
                        
$ret .= '<span class="caption-text">' $caption '</span>';
                        
$ret .= '<span class="caption-marker">*</span>';
                        
$ret .= '</div>';
                    }
                    
$ret .= '</div></div><div><div class="' $class '">' $ele->render() . '</div></div>';
                }
            } else {
                
$hidden .= $ele->render();
            }
        }
        
$ret .= '</div>' NWLINE ' ' $hidden '</form>' NWLINE;    //end tableWrap
        
$ret .= $this->renderValidationJS(true);
        return 
$ret;
    }
}


Edit: you might have to edit the td's & tr's in function insertBreak (line 37) in case it that insearts empty rows in the main form table.



23
playsome
Re: Xoops-clanpage runs slow, however xoop-companysite works like a charm..
  • 2012/8/8 11:27

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi,

there could be many issues causing your site to load slowly, there probably not related to xoops though but you could compare what modules you have installed on both sites, also make sure you use module wide and block level caching and make sure in preferences you have check templates for modifications set to no.

I run your clan site through page speed online and it got 81/100

https://developers.google.com/speed/pagespeed/insights#url=www.ramteam.tk&mobile=false

this score is actually pretty good so it would seem there is no persistent speed issues with your site.

Look through the suggestions on the page speed site and see if you can implement any, good ones to implement are usally optimizing images, combining small images into sprites, etc.

It could be that at the time when users found your site slow, there could have been intermittent server or network issues.

Hope this helps



24
playsome
Re: smarty
  • 2012/7/31 12:54

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


I think this is something that needs to be addressed, I think no HTML elements or CSS should be hardcoded into module php files, it kind of defeats the purpose of using templates surely?

As a fairly experienced xoops user (templates side of things), I often have to edit and modify templates for various projects, for example right now I am modifying templates for extcal to make them cleaner and to use divs instead of tables (except for month/week calendar view). I have also modified xcgal templates to use divs instead of tables so that I can make them responsive. But having to dig through tons of php code to find some HTML can be annoying and time consuming.

I would also propose that module smarty variables are global (global to the module), example I can only use the smarty variable for xcgal album title in certain templates, I can't use it in the header template for example.

Luckily there is smarty modifiers that can be used for some instances but I think module devs should think about the above two points to make modules easier to customize for the average end user who only knows HTML & CSS.



25
playsome
Re: Problem with the module TAG 2.31
  • 2012/7/29 12:10

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi,

see this posthttps://xoops.org/modules/newbb/viewtopic.php?start=0&topic_id=72375&order=ASC&status=&mode=0

There is a code modification to allow 2 words as a tag without having to use - or _



26
playsome
Re: Header image conflicts with menu...
  • 2012/7/23 13:56

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi Flipse,

is this the effect your trying to achieve?

Resized Image


I had a mess about with it in firebug to achive the overlapping effect. Mamba is correct you need z-index but remember an elevement(div) needs to be positioned relative or abosolute for z-index to work.

heres the code:

.site_title {
    
floatleft;
    
margin23px 0 0;
    
positionrelative;
    
z-index1;
}


#xo-globalnav {
    
clearleft;
    
floatleft;
    
left0;
    
margin-top: -10px;
    
padding0;
    
positionrelative;
    
top0;
}


That should give the desired effect, you will probably need to tidy a couple of other things up, apart from that you hsould be good to go.



27
playsome
Re: Cookie Warning (new European law) insertion. How ?
  • 2012/7/19 0:35

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Just to give my two cents on the eu cookie law...it's pretty rediculous, but we have to comply with it i suppose.

For me, I implemented a new privacy and cookies policy for the small non profit i work for and created an info box at the top of the page so when someone visit sthe site, I can let them know that we use cookies and they can click continue to accept, this falls into implied consent(i think), ironically when someone clicks continue it hides the info box and sets a cookie to remember its been hidden. LOL

Also someone can still browse the site without clicking continue.

I dont know about other European countries but if your in the UK I woulnt worry too mcuh about it, do a cookie audit and update your privacy/cookies policy to show which cookies you use and what for and if you relaly want some to do some sort of pop up/info box to alert users then that should be enough to help you comply. Alot of the big orgs in the UK still havent complied and alot of government agencies still havent complied so I dont think theres much to worry about to be honest.



28
playsome
extcal smarty variables for event date and time
  • 2012/7/14 1:03

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi all,

I am working on modifying extcal templates for a site redesign, I would alos like to modify some smarty variables.

Currently it seems there is only $event.formated_event_start which is the start date and time of the event. I would like to have seperate variables for the date and time so in templates we could have some thing like:

Event Date: 1 August 2012 Time: 18:00 until 19:00, similar to the facebook events.

Could someone point me in the right direction as to what files I should be looking at to make an attempt at this?

Thanks



29
playsome
Re: Adapt xoops for mobile use
  • 2012/7/6 9:21

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


There is always responsive design using CSS media queries, which gives you a mobile site without having to develop a seperate mobile version of a website.

However this means that the same content is served for both mobile and desktop. There is much debate within the web design/dev community about what is better for alrger or more complex sites, a responsive design or a seperate mobile app serving mobile content.

I personally don't see a problem with serving desktop content for mobile as long as it is readable. As you said above more and more people use mobile now and probably don't use desktop/laptop much, maybe one day mobile devices will replace desktops for all but specialist users.

There is many things out there to help create mobile apps, jquery mobile is one.

I think responsive design is a good start for xoops websites, there is at least one theme that I know of that includes media queries.

Until a xoops mobile framework or module is developed (maybe similar to wptouch for wordpress) then I think responsive is the way to go.



30
playsome
Re: Starting a Content/News Module Development Team
  • 2012/7/5 22:48

  • playsome

  • Not too shy to talk

  • Posts: 197

  • Since: 2009/4/15


Hi Mamba,

If your going to start development on a news/content module, please please please base it upon article by phppp. I've said it many times before, it is a great module with great features already built in, it can be used for news or a blog.

It just needs bug fixing and updating and some features added.

Please consider basing it upon article.

Thanks




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



Login

Who's Online

93 user(s) are online (64 user(s) are browsing Support Forums)


Members: 1


Guests: 92


poehoes,

more...

Donat-O-Meter

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

Latest GitHub Commits