1
epiqmail
HTML Links - How to?
  • 2003/12/6 7:07

  • epiqmail

  • Just popping in

  • Posts: 31

  • Since: 2003/12/6


Hello. I am new to XOOPS and pretty much figured out most of the basics. I need to know how I add a hyperlink that shows up on the main menu that will open another web site - not just a web page.

I tried the TINY CONTENT module and it only allows you to add static pages. I need to add a simple link to another site and have it display on the main menu. Is this possible?

Thanks!

Scott

2
CBlue
Re: HTML Links - How to?

Iframes will do it! If the other site allows itself to stay in frames.

3
CBlue
Re: HTML Links - How to?

Use a script like the one herehttp://www.dynamicdrive.com/dynamicindex17/iframescroll.htm in an html page that you can add to tiny content, free content or cjay content and create a link for it in your main menu.

4
epiqmail
Re: HTML Links - How to?
  • 2003/12/6 7:54

  • epiqmail

  • Just popping in

  • Posts: 31

  • Since: 2003/12/6


Thanks for the info! I tried the iframes deal and it works great!

Not to be a pain in the ass - Is there code to open an HTML link into a separate browser window for those apps that you cannot use the iframes code with?

With most of the external pages, I dont have the option to add any additional code to them.

Basically what I am asking is can I add a button with the Tiny Content module or a main menu button that will open a hyperlink in a new window?

Thanks again in advance.

5
CBlue
Re: HTML Links - How to?

As far as I know, using target="_blank" works for your link tags if you put it into the a href tags in the menus. That opens up another window for your link.

I hope this is what you were asking about!

6
epiqmail
Re: HTML Links - How to?
  • 2003/12/6 22:18

  • epiqmail

  • Just popping in

  • Posts: 31

  • Since: 2003/12/6


Ok, but what do I use to create the button? Can I create a button under the main menu or do I need to use something else. Can you please give me advise on how to create the button from the admin section. I am new to XOOPS and dont understand it too well yet.

Thanks in advance.

7
CBlue
Re: HTML Links - How to?

You want a button in your main menu? All you would need to do is add it to your modules/system/templates/blocks/system_block_mainmenu.html file. You can add the image url and link into your main menu that way. Then reupload the file and go to system admin, then modules admin and update your system module.

8
epiqmail
Re: HTML Links - How to?
  • 2003/12/7 22:16

  • epiqmail

  • Just popping in

  • Posts: 31

  • Since: 2003/12/6


Hey, I appreciate the help, but I am lost. I understand what you are saying in theory, but I dont know how to accomplish it.

I looked at the main menu template as you said and I really dont uderstand where I could put code in there. I dont even understand the code in the module.

And I dont understand what I am going into the system module to do?

I am basically lost.

9
JackJ
Re: HTML Links - How to?
  • 2003/12/7 23:08

  • JackJ

  • Community Support Member

  • Posts: 747

  • Since: 2003/8/31


You edit main menu in System Admin and "Templates"

If you are using the default XOOPS template you need to click on "Clone" and then set up the "Clone" as your default template in "General Settings". Call it anything you want. (The default template cant be edited without cloning)

If you are using another theme apart from XOOPS default, it it will normally be based on the XOOPS "default template",--if not, the theme you downloaded would have a "Tar" file to upload into templates (to create its own template)

You may need to click on "Generate" for some modules (in red) to create the files.

After you have set up your default template in general settings, go back to System Admin and "Templates"--your default template will have a tick against it. Now look for the "System" set of files and click on "List"

In there you will find a file called system_block_mainmenu.html

Click on "Edit"

The file should look like this:

(depending on which template you are using)

<table cellspacing="0">
<tr>
<td id="mainmenu">
<a class="menuTop" href="<{$xoops_url}>/"><{$block.lang_home}></a>
<!-- start module menu loop -->
<{foreach item=module from=$block.modules}>
<a class="menuMain" href="<{$xoops_url}>/modules/<{$module.directory}>/"><{$module.name}></a>
<{foreach item=sublink from=$module.sublinks}>
<a class="menuSub" href="<{$sublink.url}>"><{$sublink.name}></a>
<{/foreach}>
<{/foreach}>
<!-- end module menu loop -->
<a class="menuMain" href="<{$xoops_url}>/aboutbournemouth.html">Bournemouth</a>
<a class="menuMain" href="https://xoops.org">Xoops CMS</a>
</td>
</tr>
</table>


Notice after the <!-- end module menu loop --> I have added a couple of lines i.e.

<a class="menuMain" href="<{$xoops_url}>/aboutbournemouth.html">Bournemouth</a>
<a class="menuMain" href="https://xoops.org">Xoops CMS</a>

(remember to use the "classes" your template is using)

The first line provides a link to a file on my server

The second provides a link to another site, no need for target_blank, but to open in new window add target="_blank" i.e

<a class="menuMain" href="https://xoops.org" target="_blank">Xoops CMS</a>

These lines need to be outside the "module menu loop" You could have the links before "<!-- start module menu loop -->" which means they would appear at the top.

10
epiqmail
Re: HTML Links - How to?
  • 2003/12/9 4:52

  • epiqmail

  • Just popping in

  • Posts: 31

  • Since: 2003/12/6


THANK YOU SO MUCH for taking the time to write that explanation!

I went through the steps and it worked! Thank you!

The only thing i noticed is that the two buttons it added to the main menu looked different. The regular buttons had a border around them and the ones I added with your code had no borders.

I can live with it.. I am just curious as to why they look different.

Again, THANK YOU!!!

Login

Who's Online

102 user(s) are online (83 user(s) are browsing Support Forums)


Members: 0


Guests: 102


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