News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

How to put one image... HELP please!

Started by rmgweb, May 05, 2009, 06:04:15 PM

Previous topic - Next topic

rmgweb

Hi,

My forum: www.comoganharmuitodinheiro.com

Hi would like to know how can I put this image: http://www.rainha.notredame.org.br/img//espiritualidade_e_fe/dinheiro.jpg (smaller size)

in the beginig of the Forum, before "Como Ganhar Muito Dinheiro - Índice"

I would like that that image stays always there.

Please help me (send me the code)!

THANKS!

rmg

kat

"Como Ganhar Muito Dinheiro - Índice"?

Can you put that in English, please?

Do you mean right at the very top, like a banner?

Kill Em All

No, he wants that image at the left of the website. If you look at the website at the top left, you will know what he means. First, you could upload it to photobucket and resize it, or photoshop or gimp or any other photo editing program. resize it to what you like, then what I suggest doing first is getting a firefox addon called firebug. Play around with that and see if the image looks good.

You will have to put the image in your theme folder, firebug can help you out with that to as of where to put it.


My Site: KEAGaming.com

Manual Installation of Mods
Prevent Spam and Forum Attacks
Please do not PM or email me for support unless offered, help should be publicly displayed to others.

MrPhil

Quote from: Kat on May 05, 2009, 07:21:00 PM
"Como Ganhar Muito Dinheiro - Índice"?

Can you put that in English, please?

Babelfish says: "As To gain Much Money - Index". I guess "Get Rich Quick".

B.SkiLLs

Edit your index.template.php and add that HTML code or URL for that image where you want it set above or before that title text. You would also have to edit your CSS file

#logo, #logo a {}

for that them to move over the logo or make the width bigger if it does not mess the table structure up and make it out of wack.


You can replace it with that image pretty easy but to add that before and have both showing, then that is what you would have to do.


VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


kat

Quote from: MrPhil on May 05, 2009, 11:17:15 PMBabelfish says: "As To gain Much Money - Index". I guess "Get Rich Quick".

Sounds like a plan...

In that case, wouldn't going to "Current theme" and putting the url of the logo in "Theme Options and Preferences>Logo image URL:" do the trick, without any coding being needed?

rmgweb

Quote from: Kill Em All on May 05, 2009, 09:49:03 PM
No, he wants that image at the left of the website. If you look at the website at the top left, you will know what he means. First, you could upload it to photobucket and resize it, or photoshop or gimp or any other photo editing program. resize it to what you like, then what I suggest doing first is getting a firefox addon called firebug. Play around with that and see if the image looks good.

You will have to put the image in your theme folder, firebug can help you out with that to as of where to put it.

Thats right, its is there that I want to put the image.

After dinner I will try and if I have any doubt I will post here.

And yes: "como ganhar muito dinheiro" means "how to win a lot of money"  :D

Thanks all for your support!

rmgweb

Hi, I cant put the image where I want (left top, before the name of the Forum).

I have this "code" at index.template and my image is in "Themes/simple seo/images/dinheiro.jpg":

Quote// Version: 1.1; index

/*   This template is, perhaps, the most important template in the theme.  It
   contains the main template layer that displays the header and footer of
   the forum, namely with main_above and main_below.  It also contains the
   menu sub template, which appropriately displays the menu; the init sub
   template, which is there to set the theme up; (init can be missing.) and
   the linktree sub template, which sorts out the link tree.

   The init sub template should load any data and set any hardcoded options.

   The main_above sub template is what is shown above the main content, and
   should contain anything that should be shown up there.

   The main_below sub template, conversely, is shown after the main content.
   It should probably contain the copyright statement and some other things.

   The linktree sub template should display the link tree, using the data
   in the $context['linktree'] variable.

   The menu sub template should display all the relevant buttons the user
   wants and or needs.

   For more information on the templating system, please see the site at:
   http://www.simplemachines.org/
*/

// Initialize the template... mainly little settings.
function template_init()
{
   global $context, $settings, $options, $txt;

   /* Use images from default theme when using templates from the default theme?
      if this is 'always', images from the default theme will be used.
      if this is 'defaults', images from the default theme will only be used with default templates.
      if this is 'never' or isn't set at all, images from the default theme will not be used. */
   $settings['use_default_images'] = 'never';

   /* What document type definition is being used? (for font size and other issues.)
      'xhtml' for an XHTML 1.0 document type definition.
      'html' for an HTML 4.01 document type definition. */
   $settings['doctype'] = 'xhtml';

   /* The version this template/theme is for.
      This should probably be the version of SMF it was created for. */
   $settings['theme_version'] = '1.1';

   /* Set a setting that tells the theme that it can render the tabs. */
   $settings['use_tabs'] = false;

   /* Use plain buttons - as oppossed to text buttons? */
   $settings['use_buttons'] = false;

   /* Show sticky and lock status seperate from topic icons? */
   $settings['seperate_sticky_lock'] = false;
}

// The main sub template above the content.
function template_main_above()
{
   global $context, $settings, $options, $scripturl, $txt, $modSettings;

   // Show right to left and the character set for ease of translating.
   echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"';, $context['right_to_left'] ? ' dir="rtl"' : '', '><head>
   <meta http-equiv="Content-Type" content="text/html; charset=', $context['character_set'], '" />
   <meta name="description" content="', $context['page_title'], '" />', empty($context['robot_no_index']) ? '' : '
   <meta name="robots" content="noindex" />', '
   <meta name="keywords" content="PHP, MySQL, bulletin, board, free, open, source, smf, simple, machines, forum" />
   <script language="JavaScript" type="text/javascript" src="', $settings['default_theme_url'], '/script.js?fin11"></script>
   <script language="JavaScript" type="text/javascript"><!-- // --><![CDATA[
      var smf_theme_url = "', $settings['theme_url'], '";
      var smf_images_url = "', $settings['images_url'], '";
      var smf_scripturl = "', $scripturl, '";
      var smf_iso_case_folding = ', $context['server']['iso_case_folding'] ? 'true' : 'false', ';
      var smf_charset = "', $context['character_set'], '";
   // ]]></script>
   <title>', $context['page_title'], '</title>
   <link rel="stylesheet" type="text/css" href="', $settings['theme_url'], '/style.css?fin11" />
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/print.css?fin11" media="print" />';

   /* Internet Explorer 4/5 and Opera 6 just don't do font sizes properly. (they are big...)
      Thus, in Internet Explorer 4, 5, and Opera 6 this will show fonts one size smaller than usual.
      Note that this is affected by whether IE 6 is in standards compliance mode.. if not, it will also be big.
      Standards compliance mode happens when you use xhtml... */
   if ($context['browser']['needs_size_fix'])
      echo '
   <link rel="stylesheet" type="text/css" href="', $settings['default_theme_url'], '/fonts-compat.css" />';

   // Show all the relative links, such as help, search, contents, and the like.
   echo '
   <link rel="help" href="', $scripturl, '?action=help" target="_blank" />
   <link rel="search" href="' . $scripturl . '?action=search" />
   <link rel="contents" href="', $scripturl, '" />';

   // If RSS feeds are enabled, advertise the presence of one.
   if (!empty($modSettings['xmlnews_enable']))
      echo '
   <link rel="alternate" type="application/rss+xml" title="', $context['forum_name'], ' - RSS" href="', $scripturl, '?type=rss;action=.xml" />';

   // If we're viewing a topic, these should be the previous and next topics, respectively.
   if (!empty($context['current_topic']))
      echo '
   <link rel="prev" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=prev" />
   <link rel="next" href="', $scripturl, '?topic=', $context['current_topic'], '.0;prev_next=next" />';

   // If we're in a board, or a topic for that matter, the index will be the board's index.
   if (!empty($context['current_board']))
      echo '
   <link rel="index" href="' . $scripturl . '?board=' . $context['current_board'] . '.0" />';

   // Output any remaining HTML headers. (from mods, maybe?)
   echo $context['html_headers'], '
</head>
<body>';

   // The logo, user information, news, and menu.
   echo '
   <table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder">
      <tr>
         <td valign="middle" align="left"><h1>&nbsp; ', $context['page_title'], '</h1></td>
         <td valign="middle">';

   // If the user is logged in, display stuff like their name, new messages, etc.
   if ($context['user']['is_logged'])
   {
      echo '
            ', $txt['hello_member'], ' <b>', $context['user']['name'], '</b>', $context['allow_pm'] ? ', ' . $txt[152] . ' <a href="' . $scripturl . '?action=pm">' . $context['user']['messages'] . ' ' . ($context['user']['messages'] != 1 ? $txt[153] : $txt[471]) . '</a>' . $txt['newmessages4'] . ' ' . $context['user']['unread_messages'] . ' ' . ($context['user']['unread_messages'] == 1 ? $txt['newmessages0'] : $txt['newmessages1']) : '', '.';

      // Are there any members waiting for approval?
      if (!empty($context['unapproved_members']))
         echo '<br />
            ', $context['unapproved_members'] == 1 ? $txt['approve_thereis'] : $txt['approve_thereare'], ' <a href="', $scripturl, '?action=viewmembers;sa=browse;type=approve">', $context['unapproved_members'] == 1 ? $txt['approve_member'] : $context['unapproved_members'] . ' ' . $txt['approve_members'], '</a> ', $txt['approve_members_waiting'];

      // Is the forum in maintenance mode?
      if ($context['in_maintenance'] && $context['user']['is_admin'])
         echo '<br />
            <b>', $txt[616], '</b>';
   }
   // Otherwise they're a guest - so politely ask them to register or login.
   else

      echo '
            ', $txt['welcome_guest'];

   echo '
            <br />', $context['current_time'], '
         </td>
      </tr>
      <tr>
         <td colspan="2" valign="middle" align="center" class="tborder" style="border-width: 1px 0 0 0; font-size: smaller;">';

   // Show the menu here, according to the menu sub template.
   
   template_menu();

   echo '
         </td>
      </tr>';

   // Show a random news item? (or you could pick one from news_lines...)
   //if (!empty($settings['enable_news']))
   //   echo '
   //   <tr class="windowbg2">
   //      <td colspan="2" height="24" class="tborder" style="border-width: 1px 0 0 0; padding-left: 1ex;">
   //         <b>', $txt[102], ':</b> ', $context['random_news_line'], '
   //      </td>
   //   </tr>';

   echo '
   </table>

   
   <table cellspacing="0" cellpadding="10" border="0" align="center" width="95%" class="tborder">
      <tr><td valign="top">';
}

function template_main_below()
{
   global $context, $settings, $options, $scripturl, $txt;


etc etc etc etc

Please tell me what code I need to put and where!

MANY THANKS!!!!





B.SkiLLs

#8
as i said, you would have to edit the CSS file for the logo as i stated above for it to fit right, then add the image banner HTML code here in this part of that above code.




EXAMPLE:


// The logo, user information, news, and menu.
   echo '
   <table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder">
      <tr>
         <td valign="middle" align="left"><img src="http://www.simplemachines.org/community/Themes/smsite/images/site/ombanner.jpg"/><h1>&nbsp; ', $context['page_title'], '</h1></td>
         <td valign="middle">';






see if that works as it should. [ of course use your image and image URL but... ]
VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


JBlaze

Save the image to your Hd and then upload it to your own server in your theme's images directory so as not to steal bandwith from sm.org.
Then use the following:
// The logo, user information, news, and menu.
   echo '
   <table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder">
      <tr>
         <td valign="middle" align="left"><img src="' , $settings['images_url'], '"/ombanner.jpg" /><h1>&nbsp; ', $context['page_title'], '</h1></td>
         <td valign="middle">';
Jason Clemons
Former Team Member 2009 - 2012

B.SkiLLs

Quote from: JBlaze on May 07, 2009, 01:10:02 AM
Save the image to your Hd and then upload it to your own server in your theme's images directory so as not to steal bandwith from sm.org.
Then use the following:
// The logo, user information, news, and menu.
   echo '
   <table cellspacing="0" cellpadding="0" border="0" align="center" width="95%" class="tborder">
      <tr>
         <td valign="middle" align="left"><img src="' , $settings['images_url'], '"/ombanner.jpg" /><h1>&nbsp; ', $context['page_title'], '</h1></td>
         <td valign="middle">';


lol. i dont think he would do that. As i stated and anybody could tell, that was used for an example only.

VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


rmgweb

Hi,

I did it.

Now I am going to donate 5 USD to who changes my index.template code to appear one google add banner in the top of the site, after the "Home", "Ajuda", "Pesquisar", etc butons.

To the first person posting I will send the index.template file and my Google Adsense Code.

Please help me,

THANKS!

B.SkiLLs

Quote from: rmgweb on May 07, 2009, 04:26:29 PM
Hi,

I did it.

Now I am going to donate 5 USD to who changes my index.template code to appear one google add banner in the top of the site, after the "Home", "Ajuda", "Pesquisar", etc butons.

To the first person posting I will send the index.template file and my Google Adsense Code.

Please help me,

THANKS!


why not just add the Ad mod to your site ??

VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


JBlaze

Jason Clemons
Former Team Member 2009 - 2012

B.SkiLLs

Quote from: rmgweb on May 07, 2009, 04:26:29 PM
Hi,

I did it.

Now I am going to donate 5 USD to who changes my index.template code to appear one google add banner in the top of the site, after the "Home", "Ajuda", "Pesquisar", etc butons.

To the first person posting I will send the index.template file and my Google Adsense Code.

Please help me,

THANKS!


Also if you like and still want to do it this way, (which i think you should just use the mod but) you can send me that and also your CSS file and i can see what i can do for you with it to work. Should be a problem i dont think.

VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


rmgweb

The problem is that when I download the Management Ad it doest appear the option to install it.

What can I do?

THANKS

B.SkiLLs

Quote from: rmgweb on May 08, 2009, 04:13:35 AM
The problem is that when I download the Management Ad it doest appear the option to install it.

What can I do?

THANKS
Do you have for forum set to English ??

Not sure exactly what you mean so can you do the process and take a screen shot of it and attach here please ??

VICKTORY THE UNDERDOG Documentary – Pitbulls the untold true story

This is a must read & watch. Then Buy your DVD today. You will not regret it. Totally AWESOME. Best i ever seen. --
 
____________________
Message approved by
: [B. SkiLLs]
 


JBlaze

rmgweb, is this issue resolved?

What happens when you install the package? What forum version are you using?

I believe the package has been updated to work with 1.1.9
Jason Clemons
Former Team Member 2009 - 2012

Advertisement: