1
turnerrw
Search Link & Custom Menu
  • 2003/12/1 14:11

  • turnerrw

  • Just popping in

  • Posts: 68

  • Since: 2003/12/1


Hi everyone....

I'm converting a static site to XOOPS and need some basic modification help.

1. I created a custom HTML block for the top of my home page. I'd like to include a link that will execute a search. Is there a way to do this?

2. I see how my active modules populate the Main Menu. How do I create additional menus (much like the ones on this site)?

Thanks very much.

2
CBlue
Re: Search Link & Custom Menu

I create my extra menus by copying the class and id that the main menu or user menu have. For example:

User Menu Block Code






<{$block.lang_youraccount}>
<{$block.lang_editaccount}>
<{$block.lang_notifications}>
<{$block.lang_logout}>
<{if $block.new_messages > 0}>
<{$block.lang_inbox}> (<{$block.new_messages}>)

<{else}>

<{$block.lang_inbox}>
<{/if}>

<{if $xoops_isadmin}>
<{$block.lang_adminmenu}>
<{/if}>


One of my custom menu's






Staff InfoDisclaimerMembersFAQ


As you can see, I copied the td id "usermenu" and the a class "menuTop". This makes my custom menus look just like the user menu.

3
CBlue
Re: Search Link & Custom Menu

As for search...is it the search that comes in the search block that you want to create a link to? Or some other kind of search?

4
turnerrw
Re: Search Link & Custom Menu
  • 2003/12/1 18:03

  • turnerrw

  • Just popping in

  • Posts: 68

  • Since: 2003/12/1


Yes - the XOOPS search box is what I want to automate. Here's what I'm trying to accomplish.

My site is a news site that mirrors content that is sent out via email once or twice a week to a large group ( > 4500). These email distributions are referred to as Digests and readers are used to reading multiple articles at one time.

I'm trying to use XOOPS to simulate a digest of multiple articles. My intial plan is to put "Digest: 2003-105" (for instance) in the header of each news posting. Readers could then type "2003-105" into the search box and retrieve a concise list of all news postings that relate to that digest issue.

I want to automate the search via a URL so that I can place a link in a custom HTML block at the top of the News page that will direct users to "Click Here" for the latest digest. Clicking the hyperlink will perform a search for all articles with a particular string.

Ultimately, I guess, I'd like to have a custom field where I could type in the digest number. I don't know how to do that short of creating topics. Since we'll have >110 issues each year, that doesn't seem like the right approach.

5
turnerrw
Re: Search Link & Custom Menu
  • 2003/12/1 18:05

  • turnerrw

  • Just popping in

  • Posts: 68

  • Since: 2003/12/1


Cool - thanks for the menu code. I'm not sure where I'll find it, but I'll hunt around and see if I can make it work.

6
CBlue
Re: Search Link & Custom Menu

All you have to do is go to templates through system admin, then click on the system list link that's listed in the default template. Look for system_block_user.html and click on view. You will then be able to see what id and class it says for the links. Then go to blocks admin, bottom of page where you see add new block.

Type in the name you want to give your custom menu, then create your menu in the same way you see that I created mine above but make sure the id and class for your's matches what your system_block_user.html file has named.

You create your links and name them and that's it. Save the block and set the place you want it on your site and the weight. If you don't know about weight...it stands for the order of where the blocks are lined up on your site.

7
CBlue
Re: Search Link & Custom Menu

Search code:





<{$block.lang_advsearch}>


You would have to change the <($xoops_url)> to your site's full web address and keep the /search.php at the end.

This form comes from my search block in block admin.

Login

Who's Online

838 user(s) are online (57 user(s) are browsing Support Forums)


Members: 0


Guests: 838


more...

Donat-O-Meter

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

Latest GitHub Commits