1
Kent
Re: Flash Sigs in Newbb?
  • 2004/2/14 16:23

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


You should be able to do it. Follow the information regarding the ["code"] hack for the forums. The information is in the same location as the conversion of the smiley images. I'm at work right now otherwise I'd tell you what file to look at and what line to jump to.




2
Kent
Re: I need a simpler download module
  • 2004/2/14 16:15

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


This is what I would do. Put the file into a new directory on the server off of root... we'll call it something like /pdf/ or something equally as simple. Now, create a new download that links directly to your PDF newspaper (http://yourdomain/pdf/newspaper1.pdf). Copy the link of the download location for the PDF and publish it in the news. You're done.

What would be nice if there was a way to handle inbound files rather than softlinked files. I don't know of a module with that feature outside of the standard XOOPS core.




3
Kent
Re: Background image
  • 2004/2/14 15:23

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


Okay, going to write this real quick to show how to set the width and height for loading a specific graphic.

<script language="javascript1.2" type="text/javascript">
  <!--
    function 
getWindowSize() {
      var 
winW 784;
      var 
winH 632;

      if (
parseInt(navigator.appVersion) > 3) {
        if (
navigator.appName == "Netscape" || navigator.appName == "Opera") {
          
winW window.innerWidth;
          
winH window.innerHeight;
        }
        if (
navigator.appName.indexOf("Microsoft") != -1) {
          
winW document.body.offsetWidth;
          
winH document.body.offsetHeight;
        }
        
// Additional browser check here.
      
}
      return 
winW;
    }
    
// A change to the original setBackgrondImage()
    
function setBackgroundImage() {
      if (
getWindowSize() <= 600) {
        
document.body.style.background "images/background600.jpg";
      } 
// ... insert the rest here accordingly
    
}
  
//-->
</script>
< /
head>
body>
  <!-- 
your html page here //-->


Browsers not supporting CSS will still display the pages just fine without the background image. The only concern you should think about is finding the average color of the background image and use that as the background color (< body bgcolor="#xxxxxx"). That way you don't end up with white text on a white background for people who surf without loading images.

When it comes down to JavaScript, I like taking a much more object driven approach rather than putting the script into the html pages. Use the attribute "src=" to set where the external ".js" file is located. If you go about using the preload method than just change the lines to something similar to this:

document.body.style.background image600.src;


I haven't tested this script... but it should work without any problems.




4
Kent
Re: Background image
  • 2004/2/14 15:01

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


Instead of using the document.write() you should just change the element you want to work with. Here's how you can change it without breaking an html page for someone who's Javascript is turned off:

<script language="javascript1.2" type="text/javascript">
function 
setBackgroundImage() {
  if (
screen.height <= 600) {
    
document.body.style.background="images/background600.jpg";
  } else if (
screen.height 600 && screen.height 768) {
    
document.body.style.background="images/background768.jpg";
  } else {
    
document.body.style.background="images/background1024.jpg";
  }
}
</
script>


Note the compression in the JavaScript. Now you can use onLoad="setBackgroundImage()" in the body tag to call it. Doing this won't remove the body tag from the html. The only problem using this method is the image won't load with until the entire page has been loaded already; however, there is a workaround by using this method:

image600 = new Image();
image600.src "images/background600.jpg";


However, this also has a problem. Using the preloading of images will load other useless images wasting download time. A way around that would be to only use the onLoad functionality.

Now then...
- DO NOT USE the screen height.
- DO NOT MAXIMIZE the window for the screen.
- DO NOT USE popups unless it's from a link the user clicks on.
- DO NOT MOVE the window.

Taking control away from a user only pushes people away from your web site. I don't know how may sites try to do this to make their web site look "cool". Instead set the initial table width to 784 (default width of 800x600 display size with a maximized browser window with margin set at 5). Then, gather the current width of the window using window.innerWidth (or document.body.offsetWdith if you are using IE). Using the current width of the screen you can then safely set the table or div size. I would recommend using table over div as there are still some browsers out there which do not support span or div properly. I've been a web developer since before html became a standard.




5
Kent
Last Posts update
  • 2004/2/14 4:56

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


Not sure how many people use the "Last Posts" module but I wanted to let everyone know that I've got a good start on the update. I was able to put together the template system so it can be changed around according to your specifications. I'm still working on updating it but I should be able to release a working beta within the week.




6
Kent
Re: Last Posts v1.0 -- WARNING! (Xoops1 & Xoops2 included)
  • 2004/2/13 16:32

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


Thanks for the info Dave_L. In the update, I'll make sure to use the displayTarea() function instead. Though, when you look at the newbb module, it's using the same makeTboxData4Show.

Now if I can just figure out how to convert this module over to v2 style.




7
Kent
Re: Last Posts v1.0 -- WARNING! (Xoops1 & Xoops2 included)
  • 2004/2/13 14:42

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


That's a fix I've not found a hole in yet. I'm still testing it to see what else I can do to hack it though. I'll do some testing later this evening to see if I can break it again. Eventually, I would like to upgrade the module to v2 style complete with templates.

Kudos Dave and Orgin




8
Kent
Last Posts v1.0 -- WARNING! (Xoops1 & Xoops2 included)
  • 2004/2/13 3:38

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


This is a heads up for anyone who has "lastposts" module installed on their XOOPS system. There is a major security flaw that allows people to post raw html to the rendered page displaying anything they want. I'm going to pick this module appart to see what I can do to fix it, but if someone else would like to help I'm not a very good PHP developer and would love any help I can get. If I can, I would like to change the module so it's ready for Xoops2.0.6 complete with templates.

You've been informed... hopefully none of the web sites are hacked with this module installed.




9
Kent
Re: time for a new editor
  • 2004/2/2 5:48

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


None of these work with the latest Opera. Personally the standard editor should be very simple and easy to understand where as an optional editor would offer such interesting features that require high end browsers. The FCK and HTMLArea3 editors were extremely slow. Even with the functionality there I would still rather have a simple and fast editor. That's my thought on the whole changing editors.




10
Kent
Re: Problems installing forums
  • 2004/2/1 9:36

  • Kent

  • Just popping in

  • Posts: 15

  • Since: 2002/4/19


Nevermind, I was able to find the file on a cached version of the same site. There must be a problem with the DNS somewhere. Problem with the forums is solved.





TopTop
(1) 2 »



Login

Who's Online

242 user(s) are online (175 user(s) are browsing Support Forums)


Members: 0


Guests: 242


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