web_master 0 Light Poster

I am using Joomla v1.7 and the mod_mainmenu is now mod_menu (I think, because there is no mod_mainmenu in the modules folder). In my site I have two menus like most sites, one in the header and another one in the footer. The header menu is a lot more complex with drop downs, while the footer menu simply has four links. I am in the process of overriding the mod_menu template for the header menu but that would also render the same overridden html for footer menu.

How do I make two separate overrides for two separate menus. In the footer I was thinking of hardcoding anchor tags, but that would make it difficult for my client to add or remove links from the footer. How do I do this? Is it possible?

Thanks!

I appreciate the help.

web_master 0 Light Poster

Is there a way to get the name of the category and the link to the category page separately inside the wordpress loop. I don't have the id of the category either and I wanna display images instead of category names therefore the_category() doesn't work for me.

Thanks

Appreciate all the answers...

web_master 0 Light Poster

i don't get it....phpMyAdmin shows an error...

#1133 - Can't find any matching row in the user table

when i entered:

GRANT ALL PRIVILEGES ON mydb.* TO 'username'@'localhost' IDENTIFIED BY 'password';

i have checked it at-least 20 times if i was making a mistake somewhere....but i cant seem to find any....i'm doing exactly what you're saying....how can it not find that field when i can see it...

and when i made this user i did grant all the privileges if thats what the above command is for.

and thanks for the password on root tip....i do have a password now....thanks....

web_master 0 Light Poster

Thanks for the reply.

I did:

GRANT ALL ON mydb.* TO 'username'@'localhost';

but there is a password in this user thats y it probably it gives an error. "couldn't find the field in table users."

and for reference the error it shows in my web app is:

Warning: mysqli::mysqli() [mysqli.mysqli]: (28000/1045): Access denied for user 'username'@'localhost' (using password: YES)

and works perfectly fine if i use root with no password.

web_master 0 Light Poster

i created a new user with all the privileges in mysql and it didn't work. no user works except "root with no password" which is why i created several user and tried it...still didn't work....if anyone know what is wrong....please lemme know....

thank you....

web_master 0 Light Poster

I have applied an image background to the search box using its ID.

Its funny but when i type inside the search box as the text reaches the end of the box it start moving the background image to the left but only in IE6 (which i can ignore) and IE7 (which i cannot), in all the other browsers it works perfectly.

Please run this code and see what happens. If nothing else its funny.
and if u know how to rectify this then plz lemme know.

Thanks!

HTML CODE

<form id="searchform">
	<fieldset class="search">
		<input type="text" id="box" />
		<button id="btn" title="Submit Search">Search</button>
	</fieldset>
</form>

CSS CODE

fieldset.search 
{border: none; width: auto;}

.search input, .search button
{border: none; float: left;}

.search input#box
{position:relative; color: #fff; font-size: 1.2em; width: 190px; height: 33px; padding: 6px 0 0 4px; background: url('../images/search-bg.png') no-repeat; }

.search button#btn 
{width: 73px; height: 33px; cursor: pointer; text-indent: -9999px; background: url('../images/search-btn-bg.png') no-repeat;}
web_master 0 Light Poster

Thanks for the reply Ahmed but can u tell me which library this method is in...coz i am unable to find it....

Thanks.

web_master 0 Light Poster

hey,

I am developing this game of snake, just like the nokia phones have. anyway i have worked on windows till now, but now i am using geany on linux. so there are quite some methods which are not standardised for all platforms. one of them is gotoxy() and i have found that there is ncurses() instead on linux. but i dont know the syntax. if anyone out there knows please help me, or if there is some other method to mess with the coordinates of the screen.

Thanks

web_master 0 Light Poster

I solved it myself......

the code is:

#include<stdio.h>
int main()
{
    int i ,j ,a[5];
    for(i=0;i<=4;i++)
    {
        printf("\n\tEnter the %dst value of the array: ", i+1);
        scanf("%d", &a[i]);
    }
    j = a[0];
    printf("\n\tOriginal array entered by the user: ");
    for(i=0;i<=3;i++)
    {
        printf(" %d ", a[i]);
        if(a[i]<a[i+1])
        {
             j = a[i+1];
        }
    }
    printf("\n\n\tGreatest no. from the array: %d", j);
getch();
return 0;
}

the loop that was comparing the numbers was looping one extra time so i limited it to 4 times (i<=3) instead of 5(i.e. the array size).....

now it works fine......

and i dont see a better way of doing it......maybe there is a easier way.......

web_master 0 Light Poster
#include<stdio.h>
int main()
{
    int i ,j ,a[5];
    for(i=0;i<=4;i++)
    {
        printf("\n\tEnter the %dst value of the array: ", i+1);
        scanf("%d", &a[i]);
    }
    j = a[0];
    printf("\n\tOriginal array entered by the user: ");
    for(i=0;i<=4;i++)
    {
        printf(" %d ", a[i]);
        if(a[i]<a[i+1])
        {
             j = a[i+1];
        }
    }
    printf("\n\n\tGreatest no. from the array: %d", j);
getch();
return 0;   
}

according to me there is no problem in this code.......

but its printing some wierd values again n again.....

plz...help me out here....

My Wierd Output:

Enter the 1st value of the array: 56

Enter the 2st value of the array: 35

Enter the 3st value of the array: 26

Enter the 4st value of the array: 15

Enter the 5st value of the array: 24

Original array entered by the user: 56 35 26 15 24

Greatest no. from the array: 4007048

web_master 0 Light Poster

i figured it out myself:

i used the height vaiable i declared on top for comparing and inside divminus() and divplus()
and removed the hideInnerSlide() completely

CODE:

var active= 0;
var height= 0;

function toggle_visible(){
if(active==0){
	active = 1;
	divplus();
}
else if(active==1){
	active = 0;
	divminus();
}
}

function divminus(){
if(height>=1){
	height = height - 5;
	document.getElementById('slide_box').style.height = height + "px";
	if(height < 230){
		document.getElementById('marq_box').style.display="none";
	}
	window.setTimeout('divminus()',1);					
}
else{
	document.getElementById('slide_box').style.display="none";
}
}

function divplus(){
if(height <= 250){
	document.getElementById('slide_box').style.display="block";
	height = height + 5;
	document.getElementById('slide_box').style.height = height + "px";
	if(height > 240){
		document.getElementById('marq_box').style.display="block";
	}
	window.setTimeout('divplus()',1);
}
}

function hidePtr(){
shown = document.getElementById('pointer').style.visibility == "visible";
unshown= document.getElementById('pointer').style.visibility = "hidden";
if(shown){
	document.getElementById('pointer').style.visibility = "hidden";
}
else if(unshown)
{
	document.getElementById('pointer').style.visibility == "visible";
}
}
web_master 0 Light Poster

Javascripters plz help

I have made a little slider below(not perfect i know)....and i have some bugs in it......
help me debug them plz

i want 'marq_box' to hide as soon as height of 'slide_box' is less than 219px. therefore i made the function hideInnerSlide(); which ofcourse is wrong that is why the script is not working.....can anyone help me with this.....plz

in my css the original height of 'silde_box' is 220px;

the javascript code is below:

<script type="text/javascript">
var active= 1;
var height= 300;

function toggle_visible(){
	if(active==0){
		active = 1;
		divminus();
	}
	else if(active==1){
		active = 0;
		divplus();
	}
}

function divminus(){
if(height>=1){
	height = height - 5;
	document.getElementById('slide_box').style.height = height + "px";
	hideInnerSlide();
	window.setTimeout('divminus()',1);
                }
	else{
	document.getElementById'slide_box').style.display="none";
	}
}
			
function divplus(){
	if(height <= 300){
		document.getElementById('slide_box').style.display="block";
		height = height + 5;
		document.getElementById('slide_box').style.height = height + "px";
		window.setTimeout('divplus()',1);
	}
}

function hidePtr(){
	shown = document.getElementById('pointer').style.visibility == "visible";
	unshown= document.getElementById('pointer').style.visibility = "hidden";
	if(shown){
		document.getElementById('pointer').style.visibility = "hidden";
	}
	else if(unshown)
	{
		document.getElementById('pointer').style.visibility == "visible";
	}

function hideInnerSlide(){
	ht = document.getElementById('slide_box').style.height;
	if(ht <= 219)
	{
		document.getElementById('marq_box').style.display="none";
		divminus();
	}
}
}
</script>

for any more info about the code please ask....

but plz help......

Thanks All.......

web_master 0 Light Poster

i know how we can use logical operators.....but how do we use bitwise operators.....

web_master 0 Light Poster

It worked.......thank you so much....u helped me big time......i cant believe i dint try that tho......but anywayz thanks alot.....

web_master 0 Light Poster

i did that...but it shows a white space same size as the div.....thats where i'm stuck.......

web_master 0 Light Poster

The div should look like this if you want it to be hidden in the first place.

<div id="testDiv" style='visibility:hidden'>

i did that...but it shows a white space same size as the div.....thats where i'm stuck.......

web_master 0 Light Poster

Professional javascripters plz help or illl be screwed at work.....plz guys.....

I have made this sliding div....but i am having a big problem.....i dont want the div to appear in the first place....but in the code below its is already open when the page refreshed....I want it to open when i click on toggle.....n i cant understand what shud i do for that.....i have tried giving the "visibility:hidden;" to the 'testDiv'...after that it doesnt show up....but there is a whitespace of the div's size instead of the div itself......plz help....my code is below.....(i have made this with the help of a tutorial)....i'm kind of new at javascript.....

plz help......

Thanks

<html>
<head>
    <script language="javascript">
var active = 1;
var height = 100;
function toggle_visible() {
    if(active == 0) {
        active = 1;
        divPlusOne();                
    } else if(active == 1){
        active = 0;    
        divMinusOne();
    }
}

function divMinusOne() {
    if(height >= 20) {
        height = height - 1;
        document.getElementById('testDiv').style.height=height + 'px';
        window.setTimeout('divMinusOne()', 1);
    } else {
        document.getElementById('testDiv').style.visibility="hidden";
    }
} 

function divPlusOne() {
    if(height <= 100) {
        document.getElementById('testDiv').style.visibility="visible";    
        height = height + 1;
        document.getElementById('testDiv').style.height=height + 'px';        
        window.setTimeout('divPlusOne()', 1);
    }
}
</script>
    <title>JavaScript test</title>   
</head>
<body>
    <div id="testDiv">And here is my very slick menu!</div>
    <a href="#" onClick="toggle_visible()">Toggle</a>
</body>
</html>
web_master 0 Light Poster

Thank you for this method, but is there anyway i can do that without using file handling as i'm not that good at it and kind of a neubie.....

web_master 0 Light Poster

as we use \n for next line is there anyway to go back to the previous line if not then, is there anyway i can use the x,y coordinates of the runtime window.

all the experts, Please Help......

Thanks.

web_master 0 Light Poster

i have written the errors in code itself.....

//i have listed the errors as comments

#include <iostream>  // unable to open and include file 'IOSTREAM'
using namespace std;  //Declartion syntax error

int main ()
{
  cout << "Hello World!";  //undefined symbol 'cout' in function main()
  return 0;
}

thx

web_master 0 Light Poster

hey i dont know if this is the correct place to post this or not but can u tell me how to make a sub domain(if thats wat it is called) for eg::

if my domain is abc.com, then how do i make a sub domain like word.abc.com or anything.abc.com.........i hope u know wat i mean.......if anyone knows this plz tell me......

thx alot......

web_master 0 Light Poster

hey i guess anyone here cud be able to help me.......

i wanna start learning C++ n i dont know where to get a decent C++ compiler.....

i have tried "Borland C++ 4.5" n i dont know why it shows wierd errors to me......

one of my friend who knows a little C++ but does'nt know where to download it from wrote a code to print a sentence n it showed 3 errors, then i tried some online source.....i wrote the beginning code to print a sentence...showed 3 errors again..

then i went to:
cplusplus
n found this code in the tutorial which was pretty much same as my earlier one

// my first program in C++

#include <iostream>
using namespace std;

int main ()
{
  cout << "Hello World!";
  return 0;
}

and it still showed quite some errors

SOO CUD ANY1 HERE PLZ TELL ME WHERE CAN I FIND A FINE COMPILER...I REALLY WANNA LEARN IT....PLZ HELP ME......BEFORE I LOOSE ALL MY INTREST LOL........

THX GUYS...........

Sturm commented: Learn how to spell +0
web_master 0 Light Poster

how do i insert a image into a directory through MySQL, rename it, generate a link and upload the generated link in MySQL......???

anyhelp will be really apprietiated....

and if its a tutorial its the best way out, i'm not good at PHP.....

plz its urgent for me..

thx alot..

web_master 0 Light Poster

im pretty certain when linking to a site outside of your domain there becomes problems with javascript. therefore i dont believe you can get any properties from the page

but i am linking to a page inside my site only... i have changed the links so that i cud load pages coz my site is not uploaded yet....

web_master 0 Light Poster

another thing coz u have already used iframe. i hope it is compactible with all the browsers. coz i read it online sumwhere about its compactibility problem.

Thanx

web_master 0 Light Poster

Thanx alot i know u dont have time to go thru my complete code but just wrote it for a reference.

i hope ur code will solve my problem.

thanx alot

web_master 0 Light Poster

how do i make a tabbed iframe which can change its height automatically and make height equal to the content inside it.
I have never used iframe before this.

i dont want scrollers. i want it to call the size of the content inside it.
i have tried some scripts but nuthing works. i need changing of the width & height dynamically.

any help would be really appreciated.

Thanks!!

my iframe code which is not working is:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Tabs Demo</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link href="/common/default.css" rel="stylesheet" type="text/css" />
<style type="text/css">

/******************************************************************************
* Styles for the tabbed displays.                                             *
******************************************************************************/

/*-----------------------------------------------------------------------------
  Note: The border-radius property is a proposed feature for CSS3 which creates
        rounded corners. Mozilla/Netscape browsers currently support this
        feature via the proprietary -moz-border-radius property. Both are
        defined here. Browsers that support neither should simply ignore them.
-----------------------------------------------------------------------------*/

div.tabBox {
}

div.tabArea {
  font-size: 80%;
  font-weight: bold;
  padding: 0px 0px 3px 0px;
}

a.tab {
  background-color: #d0b0ff;
  border: 2px solid #000000;
  border-bottom-width: 0px;
  border-color: #f0d0ff #b090e0 #b090e0 #f0d0ff;
  -moz-border-radius: .75em .75em 0em 0em;
  border-radius-topleft: .75em;
  border-radius-topright: .75em;
  padding: 2px 1em 2px 1em;
  position: relative;
  text-decoration: none;
  top: 3px;
  z-index: 100;
}

a.tab, a.tab:visited {
  color: #8060b0;
}

a.tab:hover {
  background-color: #a080d0;
  border-color: #c0a0f0 #8060b0 #8060b0 #c0a0f0;
  color: #ffe0ff;
}

a.tab.activeTab, a.tab.activeTab:hover, a.tab.activeTab:visited {
  background-color: #9070c0;
  border-color: #b090e0 #7050a0 #7050a0 #b090e0;
  color: #ffe0ff;
}

a.tab.activeTab {
  padding-bottom: 4px;
  top: 1px;
  z-index: 102;
}

div.tabMain {
  background-color: #9070c0; …
web_master 0 Light Poster

how do i make a tabbed iframe which can change its height automatically and make height equal to the content inside it.
I have never used iframe before this.

i dont want scrollers. i want it to call the size of the content inside it.
i have tried some scripts but nuthing works. i need changing of the width & height dynamically.

any help would be really appreciated.

Thanks!!

my iframe code which is not working is:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Tabs Demo</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<link href="/common/default.css" rel="stylesheet" type="text/css" />
<style type="text/css">

/******************************************************************************
* Styles for the tabbed displays.                                             *
******************************************************************************/

/*-----------------------------------------------------------------------------
  Note: The border-radius property is a proposed feature for CSS3 which creates
        rounded corners. Mozilla/Netscape browsers currently support this
        feature via the proprietary -moz-border-radius property. Both are
        defined here. Browsers that support neither should simply ignore them.
-----------------------------------------------------------------------------*/

div.tabBox {
}

div.tabArea {
  font-size: 80%;
  font-weight: bold;
  padding: 0px 0px 3px 0px;
}

a.tab {
  background-color: #d0b0ff;
  border: 2px solid #000000;
  border-bottom-width: 0px;
  border-color: #f0d0ff #b090e0 #b090e0 #f0d0ff;
  -moz-border-radius: .75em .75em 0em 0em;
  border-radius-topleft: .75em;
  border-radius-topright: .75em;
  padding: 2px 1em 2px 1em;
  position: relative;
  text-decoration: none;
  top: 3px;
  z-index: 100;
}

a.tab, a.tab:visited {
  color: #8060b0;
}

a.tab:hover {
  background-color: #a080d0;
  border-color: #c0a0f0 #8060b0 #8060b0 #c0a0f0;
  color: #ffe0ff;
}

a.tab.activeTab, a.tab.activeTab:hover, a.tab.activeTab:visited {
  background-color: #9070c0;
  border-color: #b090e0 #7050a0 #7050a0 #b090e0;
  color: #ffe0ff;
}

a.tab.activeTab {
  padding-bottom: 4px;
  top: 1px;
  z-index: 102;
}

div.tabMain {
  background-color: #9070c0; …