By underpressure on
I want to use a bit of PHP from the internet_services theme in my own custom theme so I contacted the maintainer but never got a response, can someone tell me how I can implement this bit of code into my own theme? http://drupal.org/node/182009
Comments
=-=
I believe, the code below would go into your template.php file
however, in the above you would have to change
function internet_services_primaryto:
function YOURTHEME_primarywhere YOURTHEME is the name of your theme
----------------------------------------------------------------------------------------------------
The code below would go into it's own search-theme-form.tpl.php
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
I understand the php
I understand the php template part, well i know it goes there, its the other part that I have an issue with. I want to add that part to my node.tpl
this part exactly:
When I add it nothing happens.
----------------------------
Metal head for life \m/
=-=
I just went through the process of installing this theme to see what it does in reference to the theme it's being pulled from and I don't see it there either. Do you ?
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
it's to the right of the
it's to the right of the search bar and it says welcome user and has a few useful links to user account.
----------------------------
Metal head for life \m/
=-=
ahhhhhh! i had the search box disabled in my theme. I see now what it does.
Being at work I can't manipulate code. if someone else doesn't come along to help out, I'll look at it again when I get home from work.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
anyone care to take a stab
anyone care to take a stab at it?
----------------------------
Metal head for life \m/
=-=
Seems to work perfectly well for me.
add to template.php
then copy the search-theme-form.tpl.php from internet services theme to your theme.
it then becomes dependant on where you call
<?php print $search_box; ?>in your page.tpl.php_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
OK, how can I make it
OK, how can I make it independent of search box?
What I want is a php snippet I can inject into my page.tpl that displays links such as: Log in | Register| Forgot Password and if the user is logged in they see links relating to there account such as their profile. The above code does that but I want the extra code that relies on search stripped out, any help?
edit:
I just looked over the original post and long story short I just want to be able to stick the following code where i want in my template and work.
----------------------------
Metal head for life \m/
=-=
The above is what you want to add to a tpl.php file where you want this to work.
Notice the
<div class="welcome"><?php print $message ?></div>in the above code snippet.This a necessary component to insure that the $message is actually printed in the theme tpl.php
see example here: dev.verymisunderstood.com being used in a block.
_____________________________________________________________________
My posts & comments are usually dripping with sarcasm.
If you ask nicely I'll give you a towel : )
it works!
This method works, thank you, I'm very grateful for your time and effort spent helping me.
Now on to theming.
----------------------------
Metal head for life \m/