31
ibzan
Re: Table with rows of two alternative colors ?
  • 2003/11/6 14:22

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


You can easily do this in a couple of steps.

First you need to set a style, either directly in the page, or within the style sheet file for the theme you are using (aptly named style.css)

Create two classes (for example):

.blue
.white

The period is necessary because it defines this style as a class which you can later add to your row's tag.

For each class define their respective styles, in this case you would have something similar to:

.blue {background-color: #0000FF;}
.white {background-color: #FFFFFF;}

Now that you have this defined you can move on to the having XOOPS handle the cycling of the different classes on your row.

In a template or on the theme file, etc., you will need change the variables for your table row and should end up with something like:

<tr class="<{cycle values="blue,white"}>">

Traditionally you you have had to do this row by row (i.e. class="blue" then on the next row, class="white", etc.), or used javascript to handle this, however XOOPS takes care of this nicely via the "cycle values."

Note: don't forget both brackets AND both braces.

Chris



32
ibzan
Problem with footer
  • 2003/11/5 8:02

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


The footer displays great, however it is not what was entered in the admin part under meta tags and footer.

I checked out the footer.php file and can see that what is showing is hard-coded into the file rather than pulling the info from the DB.

Question: How can I change the footer.php file to pull the data which I entered via the "meta tags and footer" part of the admin section? (or if I have this all backwards then what

Thanks,

Chris



33
ibzan
Re: Search function
  • 2003/11/3 10:59

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


I finally figured it out:

Quote:
d.platform LIKE '%$queryarray[0]%' OR d.title LIKE '%$queryarray[0]%' OR t.description LIKE '%$queryarray[0]%'


That should do it.

Chris



34
ibzan
Re: Search function
  • 2003/11/3 10:42

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


The saga continues.

The AND statement is pulling in all the records though the platform is not there.

...



35
ibzan
Re: Search function
  • 2003/11/3 10:35

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


Though I had it working, I did try your suggestion - didn't work, but thanks anyway!

I do have one question though about the slight difference between the string I started with (the first of the two lines in that particular file):
Quote:
d.title LIKE '%$queryarray[0]%' OR t.description LIKE '%$queryarray[0]%'


and what I ended up with that appears to work:
Quote:
d.platform LIKE '%$queryarray[$i]%' AND d.title LIKE '%$queryarray[$i]%' OR t.description LIKE '%$queryarray[$i]%'


The first one had the '%$queryarray[0]%', the second had [0] replaced with [i].
What doesn't make sence to me is that, what would seem logical is what was the value of [0] would remain [0] and not [i]. Anyhow, I wouldn't have stumbled on that had you not given me the first bit of info.

Thanks!

Chris



36
ibzan
Re: Search function
  • 2003/11/3 10:24

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


I played around with your string:

Quote:
d.platform '%$queryarray[$i]%' OR LIKE d.title LIKE '%$queryarray[$i]%' OR t.description LIKE '%$queryarray[$i]%'


and came up with the following that seems to work:

Quote:
d.platform LIKE '%$queryarray[$i]%' AND d.title LIKE '%$queryarray[$i]%' OR t.description LIKE '%$queryarray[$i]%'



37
ibzan
Re: Search function
  • 2003/11/3 10:11

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


I did like you said:

Quote:

onokazu wrote:
You need to change the following line

d.title LIKE '%$queryarray[$i]%' OR t.description LIKE '%$queryarray[$i]%'

to

d.platform '%$queryarray[$i]%' OR LIKE d.title LIKE '%$queryarray[$i]%' OR t.description LIKE '%$queryarray[$i]%'

There are 2 similar lines in the file, so you need to change both.


But I still don't get anything.

When I changed the d.title to d.platform, of course that field started showing, however with the other now excluded.



38
ibzan
Re: Search function
  • 2003/11/3 9:44

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


Ok, I found the search.inc.php file and added d.platform (the field I want included in the search) and updated the module. However I am still coming up short...




39
ibzan
Search function
  • 2003/11/3 9:27

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


I have a modified module based of mydownloads and recently noticed that when I use the search function that is does find content in the body, or rather, the description however is fails to search within the platform tables.

Is there a way to include this field so that the search function would not pass it over?

Chris



40
ibzan
Re: Discussion: How best to make CONTENT multilingual
  • 2003/10/27 9:07

  • ibzan

  • Just popping in

  • Posts: 48

  • Since: 2003/8/31


I believe that one of XOOPS best features is not being acknowledged, that being the simplicity of not just administrating but with assigning various groups certain privilages, such as adding content.

Certainly most admins don't shy away from hacking here and there, and easily will adjust to using brackets, however I think we are seeing trees and not the forest for what it is.

I am currently working on a multilingual site with both Russian and English and cannot expect, nor really want to go to the trouble to teach people I am intending to post content, on how to properly use square brackets. To you an me this may be a simple thing but what about others? (This does not even address what has already been brought up concerning unecessary data passing through the TextSanitizer)

I feel at the table level a field should be added specificaly for languages, and as content is added, the language is selected. If you want your content sent to all then code can be written to pass everything through.

For example, my Russian half of the site will be different than the English. Why should I have somebody looking for Russian only content have to sift through English? A great example, though not necessarily the only one would be the way PostNuke handles languages (though I am not familiar with how their code works behind it, I am only referring to the tables).

Does that make any sence?

Chris




TopTop
« 1 2 3 (4) 5 »



Login

Who's Online

244 user(s) are online (158 user(s) are browsing Support Forums)


Members: 0


Guests: 244


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