News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Change the Home Buttom Link

Started by wyasser, January 21, 2015, 11:32:46 AM

Previous topic - Next topic

wyasser

I want to change the Home Buttom Menu Link to my website.  I means when user clicks Home it will take the user to my website that is hxxp:mgtforum.freehostingking.com/drupal [nonactive] 

Please help me.  I am new  so it is requested to please use easy method

Kindred

http://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0

however, instead of ADDING new code, you would modify the first button in the array changing

            'href' => $scripturl,

to be

            'href' => 'http://yoururl.com',

Сл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."

Spr1te

Hi Kindred,

Tried that and nothing happens. Still takes me back to smf home instead of url?

margarett

Did you change the correct button?
It has to work, if the edit was correct.

Also, are using Cloudflare? If so, you might need to empty its cache ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Spr1te

Hi Margarett,

Followed instructions > Sources>Subs.php>then did changes including 'inv commas which weren't present in code'. Thing I noticed was a full stop was present after > $scripturl . not comma as suggested, would this affect things?

Getting a http 500 int serv error now?

Regards

margarett

Better to give us the code you have right now ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

I suspect that you modified the wrong location....
Сл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."

Spr1te

Margarett

Suggested > 'href' => 'http://yoururl.com', (Tried exactly as suggested - no go)

Currently  >  'href' => http://cue-union.com . (No inv commas or comma after code just stop)



Spr1te

Kindred,

Sorry for the confusion, no as stated I modified Sources/Subs.php via hosts cPanel can quote line number if you wish.

margarett

Attach the file here so that we can take a look ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

you ***MUST*** have the single quotes (what you seem to be calling inverted commas)

'href' => 'http://cue-union.com',

and you ***MUST*** have a COMMA at the end of that line, not a period.
Сл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."

Spr1te

Kindred,

Ok I re edited code appearing on line 4066 exactly as you described and still getting 500 error.

I might note this is how I first edited script but because it didn't work I figured the stop had something to do with it. Hence the last mod.

I didn't clear cache though?

Regards

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Kindred

if you are getting a 500 error, it;s not because of the file contents (because, with the way you made the edits, you would have gotten a parse error)

a 500 error is a server side thing...  either because you have the file chmod permissions wrong or because your host/configuration has some other issue with the way you edited the file
Сл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."

Spr1te

Quote from: margarett on January 21, 2015, 06:19:43 PM
Quote from: margarett on January 21, 2015, 05:24:05 PM
Attach the file here so that we can take a look ;)
;)

Margarett

Starting to think your sig might be appropriate in this instance. Here's the code block you were after.

'mlist' => array(
            'title' => $txt['members_title']
            'href' => 'http://cue-union.com', '?action=mlist',
            'show' => $context['allow_memberlist'],
            'sub_buttons' => array(
               'mlist_view' => array(
                  'title' => $txt['mlist_menu_view'],
                  'href' => 'http://cue-union.com', '?action=mlist',
                  'show' => true,
               ),
               'mlist_search' => array(
                  'title' => $txt['mlist_search'],
                  'href' => 'http://cue-union.com', '?action=mlist;sa=search',
                  'show' => true,
                  'is_last' => true,
               ),



margarett

That's not a proper link to your site... That's the memberlist button...
Maybe it's easier if you use this
http://custom.simplemachines.org/mods/index.php?mod=3674
;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Illori

the OP should first revert their changes and get their forum working before trying to install a mod.... and dont forget to do a backup first.

Kindred

Also...I never to,d you to modify the mlist item... I told you to modify the first item in the array... Which is labeled home...

I also listed the href exactly as it was... You went and modified a compketely different line...
Сл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."

Spr1te

Thanks Margarett / Illori,

Reinstated forum > 500 error was caused by deletion of comma after first line of mlist array, corrected and all ok.

Kindred,

I tried editing code as follows..

$buttons = array(
         'home' => array(
            'title' => $txt['home'],
            'href' => $scripturl,
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
         ),

I replaced $scripturl, with http://cue-union.com, to no avail - Am I missing something?

Kindred

         'home' => array(
            'title' => $txt['home'],
            'href' => 'http://cue-union.com',
            'show' => true,
            'sub_buttons' => array(
            ),
            'is_last' => $context['right_to_left'],
         ),


however, changing that will not result in a 500 error.
the 500 error is the result of some misconfiguration on your server side. check with your host as to why...
Сл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."

Spr1te


Advertisement: