Adding a Link @ the top pf my page

Started by Uhura!, August 10, 2013, 08:34:06 PM

Previous topic - Next topic

Uhura!

Second question - related to this because it is taking up space in the top menu & I would like to replace it with "Advertise."

How do I remove the facebook link. I don't see it in Subs.php...



I have the SA Facebook Mod. i suspect that's what did it & here are the files. Can you help?:

    Facebook/.svn/entries (1141 bytes)
    Facebook/.svn/text-base/Facebook.php.svn-base (5297 bytes)
    Facebook/.svn/text-base/FacebookAdmin.php.svn-base (22223 bytes)
    Facebook/.svn/text-base/FacebookCompat.php.svn-base (35339 bytes)
    Facebook/.svn/text-base/FacebookHooks.php.svn-base (55357 bytes)
    Facebook/.svn/text-base/FacebookIntergrate.php.svn-base (17256 bytes)
    Facebook/.svn/text-base/FacebookProfile.php.svn-base (4970 bytes)
    Facebook/Facebook.php (5297 bytes)
    Facebook/FacebookAdmin.php (22229 bytes)
    Facebook/FacebookCompat.php (35339 bytes)
    Facebook/FacebookHooks.php (55357 bytes)
    Facebook/FacebookIntergrate.php (17256 bytes)
    Facebook/FacebookProfile.php (4970 bytes)
    facebookauth/.svn/entries (1138 bytes)
    facebookauth/.svn/text-base/base_facebook.php.svn-base (33933 bytes)
    facebookauth/.svn/text-base/channel.html.svn-base (264 bytes)
    facebookauth/.svn/text-base/facebook.php.svn-base (2885 bytes)
    facebookauth/.svn/text-base/facebookhooks.txt.svn-base (5008 bytes)
    facebookauth/.svn/text-base/facebook_canvas.js.php.svn-base (1817 bytes)
    facebookauth/.svn/text-base/fb_ca_chain_bundle.crt.svn-base (7504 bytes)
    facebookauth/base_facebook.php (33933 bytes)
    facebookauth/channel.html (264 bytes)
    facebookauth/facebook.php (2885 bytes)
    facebookauth/facebookhooks.txt (5008 bytes)
    facebookauth/facebook_canvas.js.php (1817 bytes)
    facebookauth/fb_ca_chain_bundle.crt (7504 bytes)
    images/.svn/entries (350 bytes)
    images/.svn/prop-base/facebook.png.svn-base (53 bytes)
    images/.svn/text-base/facebook.png.svn-base (374 bytes)
    images/facebook.png (374 bytes)
    lang/.svn/entries (515 bytes)
    lang/.svn/text-base/Facebook.english-utf8.php.svn-base (12307 bytes)
    lang/.svn/text-base/Facebook.english.php.svn-base (12307 bytes)
    lang/Facebook.english-utf8.php (12307 bytes)
    lang/Facebook.english.php (12307 bytes)
    Changelog.txt (689 bytes)
    Facebook.template.php (16934 bytes)
    FacebookAdmin.template.php (9011 bytes)
    install.php (6176 bytes)
    install.xml (1920 bytes)
    readme.txt (119 bytes)
    redirect.txt (149 bytes)
    remove_hooks.php (1913 bytes)
    UnInstall.php (1141 bytes)
    package-info.xml (2395 bytes)
:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

Kindred

Uhura,

NO offense, but I don't think that you even bother to read what I write...

Quote from: Kindred on August 12, 2013, 11:37:31 AM
and, use the exact text that I listed, including the semicolon, otherwise you'll cause an error

every full line of code must end with a semicolon

As for the facebook...  yes, that is the SA facebook mod. It adds the button via the integration hooks.
For help with a specific mod, please ask in the support thread for that mod.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Uhura!

Interesting assumption.

Here's an alternative explanation: I don't know how to write this type of code (- which is why I had to ask for assistance) & I did not know (& still don't know) what a "parens" is.


:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

Kindred

it's shorthand for parenthesis as in ( and ) (open parens and close parens)

I understand if you don't fully comprehend coding...   but I did specify that you needed the semicolon....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Uhura!

Can anyone help me with this?

I've installed the code which was previously given to me but I can't get the "Advertise" to work when I add the code below to the language file.

$txt['Advertise'] = 'Advertise'

Which part of this is wrong?~>

Quote$txt['related_topics'] = 'Related Topics';
$txt['Advertise'] = 'Advertise'
$txt['ContactUs'] = 'Contact Us'
// END Added by Related Topics
:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

Kindred

I already told you three times... YOU NEED A SEMICOLON AT THE END OF EACH LINE!!!!

$txt['Advertise'] = 'Advertise';
$txt['ContactUs'] = 'Contact Us';


So, my assumption seems to be correct. You are not reading what I am writing.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Uhura!

I followed all of the instructions you provided. My log out button is gone.

Can you help?
:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

Colin

Let's all relax. It was an innocent mistake. As a newer person looking at code it is sometimes hard to pick out the bug. I completely understand where you are coming from, Uhura.
"If everybody is thinking alike, then somebody is not thinking." - Gen. George S. Patton Jr.

Colin

Uhura!

Thanks Colin.

I added logout to the lang file, but that did not seem to work.
Quote
$txt['related_topics'] = 'Related Topics';
$txt['Advertise'] = 'Advertise';
$txt['Logout'] = 'Logout';
$txt['ContactUs'] = 'Contact Us'

Can you tell me where I am going wrong?


Here's the associated Subs.php code I have

Quote
         'login' => array(
            'title' => $txt['login'],
            'href' => $scripturl . '?action=login',
            'show' => $user_info['is_guest'],
            'sub_buttons' => array(
            ),
         ),
                  'Advertise' => array(
            'title' => $txt['Advertise'],
            'href' => $scripturl . '?page=Advertise_at_Our_Mom_Spot',
            'show' => true,
            'sub_buttons' => array(
            ),
         ),
         'ContactUs' => array(
            'title' => $txt['ContactUs'],
            'href' => $scripturl . '?page=Contact_Us',
            'show' => true,
            'sub_buttons' => array(
             ),
         ),
         'register' => array(
            'title' => $txt['register'],
            'href' => $scripturl . '?action=register',
            'show' => $user_info['is_guest'],
            'sub_buttons' => array(
            ),
            'is_last' => !$context['right_to_left'],
         ),
         'logout' => array(
            'title' => $txt['logout'],
            'href' => $scripturl . '?action=logout;%1$s=%2$s',
            'show' => !$user_info['is_guest'],
            'sub_buttons' => array(
            ),
            'is_last' => !$context['right_to_left'],
         ),
     );


      // Allow editing menu buttons easily.
      call_integration_hook('integrate_menu_buttons', array(&$buttons));
:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Uhura!

Wait - I see it now... it fell off the menu due to spacing. ...Its a little hard to see because it;s white, but it's there...
This is a different matter entirely now.


:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

Uhura!

And for non admins, the facebook falls away

:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

Kindred

Because of your theme design, you have a limited space for the menu...   And nowou have too many buttons,
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Storman™

Uhura! - because you have so many buttons the last one is now jumping to the next line as it's simply run out of room.

To get round this you could either:

1) Reduce the amount of padding between the text of each button so that they are more "bunched up". You can do this by reducing the value for the navigation padding in the index.css file

2) Reduce the size of the text in the buttons (probably not a good idea as they look about right as they are).

3) Consider adding an additional side menu in your portal for some of the buttons.

Also,don't forget you are looking at it as an "Admin" and you have extra buttons like "Admin" and "Moderate" which normal members don't have. Consequently, try looking viewing it as a normal member (make a test account) as it might actually be ok for them.

;)

Uhura!

I think the answer is to remove one of the other buttons... The Facebook button is the obvious choice.

I asked for help in the topic for the SA Facebook mod. They say it's in "it is in sources/facebook/facebookHooks.php"

Any tips about safely removing the code? (I am SO not a coder :) )
:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

Storman™

Try swapping it over with the one I've attached. Not sure if it will work as I've not tried it, nor do I use that mod, but it should do the trick.

Make sure you keep a backup copy of your existing file (rename it for now).


Uhura!

Hi,

Can you tell me if I can use this file with SMF 2.0.6?

After my forum was upgraded, this issue returned.

Thank you!
:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

NanoSector

Hi Uhura,

Since mods made for 2.0.5 should still work with 2.0.6 it's probably safe to use that file in 2.0.6, yes :)

As a suggestion - What about adding the Facebook button as the FB logo somewhere above your menu?
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Uhura!

Quote from: Yoshi on November 27, 2013, 12:53:10 PM
Hi Uhura,

Since mods made for 2.0.5 should still work with 2.0.6 it's probably safe to use that file in 2.0.6, yes :)

As a suggestion - What about adding the Facebook button as the FB logo somewhere above your menu?

Yoshi, I appreciate the reply. The file was used when I had 2.0.4

Question: Have you seen my site? I am asking because of your comment about placing a Facebook button. If not, please click here & then tell me if you have any more advice. Thanks!
:) Our Parenting Spot is an online parenting community for fathers, mothers, grandparents, teachers, and family service professionals. 8) We also provide low cost advertising options for authors, family service providers, and businesses with family friendly products and services. ;D Visit us @ www.OurParentingSpot.net!

NanoSector

It should still be fine in 2.0.6 :)

I only looked at your site through the screenshots, I'll take a peek tomorrow to see what I can come up with.
My Mods / Mod Builder - A tool to easily create mods / Blog
"I've heard from a reliable source that the Answer is 42. But, still no word on what the question is."

Advertisement: