11
zite83
Re: Cried when tested on IE6
  • 2009/7/18 3:10

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


I never realized how much time its been since I last did Style Sheets and HTML which was back in 2003-2004. So I still have the mind set to code around IE6 but now I have dropped that. My theme now looks perfect on all browsers. IE6 has a few minor quirks but nothing as bad as it was before. Just cleaning up the style sheets and my code and compressing the images to a smaller size. Then I should have my first theme uploaded in a few days.

Then there were just some odd issues I could not figure out, untill I looked back at my CSS file which contained

#top {
    
    
width:100%;
    
backgroundurl(images/top_bg.jpg);
    
height:256px1111111111wwwwwwwwwaaaaaaaaaqq11;    
    }


Found out what was causing that
Resized Image



12
zite83
Re: Cried when tested on IE6
  • 2009/7/12 19:04

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


Thanks didn't think submitting was that easy :p After original post I took a look at common issues with IE 6 and noticed why there was such a difference. My theme pretty much consisted of everything that IE 6 does wrong... Sigh..

Transparent PNGS
Padding concept completely different
Double Margin bug
Div Heights less than 20px

But found a few changes that should help.



13
zite83
Cried when tested on IE6
  • 2009/7/12 6:29

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


So I dived into the wonderful world of themes css and styling ect.. Much more fun than learning PHP :p I am about done with my first theme. I just have a few questions.

My main question is how do I go about submitting my theme to xoops.org so everyone can have at it.

Next questions is.. So I was testing my CSS cross multiple browsers. Everything looked great till I dropped down to test the site on IE6.0 and under.. I was shocked.. It was like someone had just taken my CSS file and randomly mixed up my styling. I could hardly recognize my own theme. I know IE6 was bad but not that bad.. So the question is what should I do since for some reason there is still a strong percentage using IE6 (My job just upgraded to IE7 end of June 2009...) I have no problem myself just adding !--[if lt IE 7.] tag in my theme.html and putting some big ugly div stating you are not welcome here please upgrade or leave.. But since I am making it public I would like some in site

Thanks much!




14
zite83
Re: $xoops_contents HTML output stays
  • 2009/7/8 23:09

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


Hey yeah... so... I just had to laugh at myself for how long it took me to figure this one out...

So I check out the source.. And saw all my tags divs ect.. and then I saw this...

<div style="display: none;">
    <
p>Change the content of this template to fit your needs.</p>
</
div>


Huh.. well that looks funny.. Took a look at my system templates and found... system_homepage.html... Hmm never saw that before.. Took out the everything in that template... Works great now... Uggg... So ghia did you know what my problem was and just played dumb to make me find out myself :p

Hurray for me! I can finish my theme!



15
zite83
$xoops_contents HTML output stays
  • 2009/7/8 22:22

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


Working on a new theme and this $xoops_content isn't working like I thought it would. Now I can see why no other themes do this. I want to put a border around my content so I can achieve this style.

Theme Concept
Resized Image


What I am having troubles with is that when I include all my styling with in the IF statement it still shows my divs/background images ect while on index with out a module set as the default front page. What I don't get even more is when I use the <{if $xoops_isadmin}> statment for my menus on other themes, if not an admin it clears out all the extra images / divs ect from the HTML output with in that statment, now home come the IF contents statement doesn't do the same? Just real curious would love some help. If can't be done, then I will just have to rethink and redo the whole concept of my layouts.

By the way my themes contain no tables

<{if $xoops_contents}>
<{
$xoops_contents}>
<{/if}>


Snippet of my CSS
#content_block {
    
width:835px
    
float:left
    
margin:0px 0px 5px 5px;  
    
backgroundurl(images/content_bg.png);
    }
#content_top {
    
width:835px
    
height:40px;
    
backgroundurl(images/835x_content_top.png);
    }
#content_content{
    
background-color:#B3CEDF;
    
width:825px;
    
backgroundurl(images/835y_border.png);
    
padding0pc 5px 0px 5px;
    }
#content_bottom{
    
width:835px;
    
height:40px;
    
backgroundurl(images/835x_content_bottom.png);
    }



<!-- Start of content -->   
<{if 
$xoops_contents && ($xoops_contents != ' ') }>
  <
div id="content_block">
    <
div id="content_top">
    </
div>
    <
div id="content_content">
      <{
$xoops_contents}>
    </
div>
    <
div id="content_bottom">
    </
div>
  </
div>
<{/if}>
<!-- 
End of content -->




16
zite83
Re: Display new field in newbb
  • 2009/5/28 22:52

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


After playing with this some time, this is what I have come up with. You do need to alter / modify the user.php class file.
STEP 1 locate getInfo in user.php file
function getInfo()
    {
        global 
$xoopsModuleConfig$myts;
        
$userinfo=array();
        
$user =& $this->user;


STEP 2 add these two lines of code to line 229
$profile_handler xoops_getmodulehandler('profile''profile');
$profile $profile_handler->get($user->getVar("uid"));


so it ends up looking like this
function getInfo()
    {
        global 
$xoopsModuleConfig$myts;
        
$userinfo=array();
        
$user =& $this->user;
        
$profile_handler xoops_getmodulehandler('profile''profile');
        
$profile $profile_handler->get($user->getVar("uid"));


STEP 3 Which should be line 242 add this line of code
$userinfo["myfield"] = $profile->getVar('myfield');


STEP 4

in newbb_thread.html under the modules templates add this anywhere you want myfield to be displayed

<{$topic_post.poster.myfield}>


All you now have to do is repeat steps 3 and 4 and that should do what you want. Also remember to update your template files after you make the changes. I hope this helps, I don't really know how to program all that well, but playing with what I have read in this topic this is what I have come up with Tested it with XOOPS 2.3 and cbb 3.08




17
zite83
Re: $xoops_isadmin, $xoops_isuser, but $xoops_<custom group>?
  • 2009/3/17 23:01

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


Thanks for the feed back! I'm not a programmer to the slightest but I can understand the basics of it, I just know how to use others code snippets to solved my problems



18
zite83
Re: $xoops_isadmin, $xoops_isuser, but $xoops_<custom group>?
  • 2009/3/17 1:35

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


Here is how I got mine to work

I used this because I have a custom nav bar at the top of my website, it doesn't really need to be dynamic but what I need is when a user logs in if that person belongs to the right group something will show up. So in my case, when a user is logged in and belongs to group 9 he or she will get a "Submit News Link" other users that don't belong to this group do not get the link.

Another thing I noticed is when you update a user and add a new group for them to belong to, it won't take effect till next log in.

/class/template.php
add
global $xoopsUser;
if ( @
$xoopsUser && is_object($xoopsUser) ) {
$this->assign'xoops_usergroups'$xoopsUser->getGroups() );}


under

$this->Smarty();


save file template.php

add to your theme/template
<{foreach item=group from=$xoops_usergroups}>
    <{if 
$group.groupid == 9}>  
        
YOU CAN SEE ME GROUP 9!
    <{/if}>
<{/foreach}>





19
zite83
Re: Formdatetime 12 hour format
  • 2006/10/25 23:38

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


Does that change the time selection box of a date/time form element? Thats what I intended here. To change 0:00 - 23:50 to 12:00am - 11:50pm. So when users submit an event in lets say "news" or "extcal" the time selection box is abit more user friendly to 12 hour formated people.



20
zite83
Formdatetime.php 12 hour format
  • 2006/10/25 19:24

  • zite83

  • Just popping in

  • Posts: 41

  • Since: 2004/10/5


I have no clue if anyone has done this or if there is even a need for it. I've tried searching for this type of hack but could not find it so I just played around with the code till I got what I wanted.

Reason for this hack is because of my users. My users range from 10 years old to 50. Such a wide range and alot of the younger viewers of my site dont understand 24 hour time. I myself have no problem using 24 hour format. Even my work schedule is in 24 hour here in the states. So I went ahead and changed the formdatetime.php file.

Original formdatetime.php
$timearray = array();
        for (
$i 0$i 24$i++) {
            for (
$j 0$j 60$j $j 10) {
                
$key = ($i 3600) + ($j 60);
                
$timearray[$key] = ($j != 0) ? $i.':'.$j $i.':0'.$j;
            }
        }
        
ksort($timearray);


Replace with
$timearray = array();
            
// AM Array **************************************************************************************//
            
for ($i 0$i 12$i++) {
                for (
$j 0$j 60$j $j 10) {
                    
$key = ($i 3600) + ($j 60);
                    if (
$i == 0){
                        
$timearray[$key] = ($j != 0) ? '12'.':'.$j.' am' '12'.':0'.$j.' am';
                        }
                    else{
                        
$timearray[$key] = ($j != 0) ? $i.':'.$j.' am' $i.':0'.$j.' am';
                        }
                }
            }
            
// PM Array **************************************************************************************//        
            
for ($i 12$i 24$i++) {
                for (
$j 0$j 60$j $j 10) {
                    
$key = ($i 3600) + ($j 60);
                    if (
$i 12){
                        
$timearray[$key] = ($j != 0) ? ($i 12).':'.$j.' pm' : ($i 12).':0'.$j.' pm';
                        }
                    else{
                        
$timearray[$key] = ($j != 0) ? $i.':'.$j.' pm' $i.':0'.$j.' pm';
                        }
                }
            }
        
        
        
ksort($timearray);


I am not much a programer. So let me know if there are any problems with it.




TopTop
« 1 (2) 3 4 »



Login

Who's Online

213 user(s) are online (140 user(s) are browsing Support Forums)


Members: 0


Guests: 213


more...

Donat-O-Meter

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

Latest GitHub Commits