Warning: The author of this contribution does not provide support for it anymore.

Add Homepage link in header

help with install - Add Homepage link in header

help with install

by Trekky » Fri Jun 25, 2010 9:03 am

Hi there,

My forum has just been updated to 3.0.7pl1 and i want to re-add this mod to it. I would do it using automod as before but it thinks its already installed from last time.

1) Will this work with the new phpBB version?
2) I don't understand what i have to do with the following bit of the install:
SQL
Code:Select All
INSERT INTO phpbb_config (config_name, config_value) VALUES ('show_homepage', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('show_homepage_in_new', '0');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('homepage_url', 'http://www.your_own_site.com');
INSERT INTO phpbb_config (config_name, config_value) VALUES ('homepage_title', 'Your homepage title');

Any help would be very much appreaciated :D
User avatar
Trekky
Registered User
Posts: 232
Joined: Fri Jul 24, 2009 10:16 am
Location: Wiltshire
Name: Lesley Reed
Contact:

Re: help with install

by Oyabun1 » Fri Jun 25, 2010 12:33 pm

  1. Yes
  2. Those are the changes to the database. If the MOD is already installed then you will not have to redo the SQL queries because the changes to your database will already be done.

If after the update to 3.0.7-PL1 you can no longer see the link to the homepage then first check the edit to the overall_header.html file.
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: help with install

by Trekky » Fri Jun 25, 2010 1:19 pm

Cheers for that i'll check it out :D
User avatar
Trekky
Registered User
Posts: 232
Joined: Fri Jul 24, 2009 10:16 am
Location: Wiltshire
Name: Lesley Reed
Contact:

Re: help with install

by brianrhunt » Fri Sep 10, 2010 5:14 am

I just added this Mod, I was able use board settings to make the changes but the link is not working. I cleared the cache, I am using 3.07. Also, I used automod to add it. Eveything there but it is not showing up
brianrhunt
Registered User
Posts: 13
Joined: Thu Sep 09, 2010 11:09 pm
Contact:

Re: help with install

by Oyabun1 » Fri Sep 10, 2010 8:58 am

Did you also refresh your templates as instructed by the install file? If so, try clearing your browser cache for the site (for Windows, usually Ctrl + F5).
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: help with install

by ronled » Mon Dec 27, 2010 12:45 pm

ChriZathens,

Problem with install. Not showing the link but showing the option in ACP.

For further clarity, I had tried to install this before and it didn't work. I had a current backup that I then restored and deleted the mod archive in automod.

Using proDARK.

I can give you the forum link.

I just now installed with the following error and no show (of homepage link) as mentioned.

Following is error that showed:

Code: Select all

Error:Duplicate entry 'show_homepage' for key 1
INSERT INTO phpbb_config (config_name, config_value) VALUES ('show_homepage', '0')
Error:Duplicate entry 'show_homepage_in_new' for key 1
INSERT INTO phpbb_config (config_name, config_value) VALUES ('show_homepage_in_new', '0')
Error:Duplicate entry 'homepage_url' for key 1
INSERT INTO phpbb_config (config_name, config_value) VALUES ('homepage_url', 'http://www.your_own_site.com')
Error:Duplicate entry 'homepage_title' for key 1
INSERT INTO phpbb_config (config_name, config_value) VALUES ('homepage_title', 'Your homepage title')


As a side point... rss feeds link doesn't show for some time and not sure why. Perhaps you can assist??
ronled
Registered User
Posts: 27
Joined: Tue Dec 21, 2010 2:53 am
Contact:

Re: help with install

by ChriZathens » Mon Dec 27, 2010 1:12 pm

The error occured because the database entries have already been entered in the previous installation attempt... Don't worry about it..
If you can still see the options in ACP, but no link in header, then it is because of 2 reasons:
1. You did not refresh templates in ACP, or
2. The changes are not installed because the default installation style is prosilver and not proDark. I think that (at least in previous versions of Automod) you can set the theme you want the mod to be installed to, but in version 1.0.0 of Automod I cannot find this anymore. You can ask in the Automod support section, but you don't really need to, since the problem is very easily fixed:
Follow these instructions (just 1 file edit - it should not take more than two minutes)
Post here if there are any further problems - I will be online for about two more hours
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: help with install

by ronled » Mon Dec 27, 2010 7:52 pm

I did refresh the darkPRO template.

Yes, is Automod 1.0.0 and didn't see that option.

K... which file to edit... I want to make sure I understood the "these" instruction link and which part of that page FOR SURE before I do it. All?

Also, the double entry isn't and issue? You are mentioning moreso that it was already there but not double entered... am I to understand?

Thanks
ronled
Registered User
Posts: 27
Joined: Tue Dec 21, 2010 2:53 am
Contact:

Re: help with install

by Oyabun1 » Mon Dec 27, 2010 8:09 pm

First, have a look at this, Installing a modification.

Then, follow the instructions ChriZathens pointed to (substitute your style name for prosilver in the path for the file to open - so, probably, styles/prodark/template/overall_header.html).
                      Support Request Template
3.0.x: Knowledge Base Styles Support MOD Requests
3.1.x: Knowledge BaseStyles SupportExtension Requests
User avatar
Oyabun1
Former Team Member
Posts: 23162
Joined: Sun May 17, 2009 1:05 pm
Location: Australia
Name: Bill

Re: help with install

by ronled » Mon Dec 27, 2010 8:40 pm

Thanks Oyabun1,

If you take it as "probably", I will wait a little bit to make sure from ChriZathens.

Also, in Automod... the mod isn't showing as having installed. Likely because of the errors even though it appears ChriZathens is indicating that it has except for a small edit. Want to make sure of things as to not cause myself unnecessary headaches. Forum is working and I don't want to screw something up by being over anxious. I like to plan a path.

ChriZathens, if you would be so kind, please spell out what I need to do as clear as possible.

Thanks,
Ron
ronled
Registered User
Posts: 27
Joined: Tue Dec 21, 2010 2:53 am
Contact:

Re: help with install

by ChriZathens » Tue Dec 28, 2010 11:58 am

The SQL part is to run at first, so that's why the mod was not installed the last time...

OK, so let's deal with it:
The best thing you can do is initially to verify that the files do not have the needed changes from the first installation attempt.
  1. Connect to your forum using an ftp client like Filezilla (freeware) and download includes/functions.php to your desktop.
  2. Open it with a text editor like Notepad ++ (also freeware)
  3. Check that after

    Code: Select all

    'SITE_LOGO_IMG'         => $user->img('site_logo'),

    the following lines DON'T exist:

    Code: Select all

          'S_SHOW_HOMEPAGE'      => ($config['show_homepage']) ? true : false ,
          'S_SHOW_HOMEPAGE_IN_NEW' => ($config['show_homepage_in_new']) ? true : false ,
          'U_HOMEPAGE'         => $config['homepage_url'],
          'U_HOMEPAGE_TITLE'      => $config['homepage_title'],

    (Those lines are added by the mod, so if they don't exist there, then this is an indication that the files are as they were before the installation attempt)
    The other files affected by the mod are:
    * includes/acp/acp_board.php,
    * language/en/common.php,
    * language/en/acp/board.php,
    * styles/prosilver/template/overall_header.html (this one, actually you don't need to check it since your style is not prosilver)
    My personal opinion is that in order to be 100% sure, you must check all of them.. If the lines in includes/functions.php I mentioned before do not exist, then it is an indication that the files are untouched, but I think it is better to check all of them.
    To do so, click this link: http://www.phpbb.com/customise/db/view-install/id_54228. You will see there all the additions that are made by the mod.
    As Oyabun1 correctly pointed out,
    Oyabun1 wrote:First, have a look at this, Installing a modification.
    it is better for you to also read this article..
    If you read it, you will see what needs to be done in order to install a modification manually (without using Automod). So you will have a good understanding of what is happening when Automod does its job ;)
    IF changes I mentioned before DO exist, make sure that they do exist in all those files and do nothing more - post here and I'll tell you what to do!
  4. Once you have verified that files are OK, it is time to install the mod again. Since you get the error, then fields are already added in the database, that's why Automod can't continue, because duplicate entries would be created. Normally, I should tell you to enter your database using phpmyadmin and run a query to delete those entries so that they are inserted again during the mod installation, but let's do something else instead..
  5. Download this attachment:
    Add_Homepage_Link_1.0.8.zip
    (32.18 KiB) Downloaded 170 times

    I have modified it so that it will tell automod NOT to run the sql queries (since they already exist in your db) and to modify proDark template file, instead of prosilver (that's what happened in your first installation attempt: The mod was installed, but it was installed for prosilver template, therefore it was not visible to you because you were using proDark)
  6. Use Automod and point it to this zip
  7. Installation should finish with no errors..

I hope my post is clear enough. If you have any questions, or there is something you don't understand in my post, ask here again..

P.S.: Oyabun1 was correct. The link I gave you before was taking you directly to the installation part for the template file. If you haven't tried to uninstall the mod the first time, all you had to do to make it work was to open styles/proDark/template/overall_header.html and add

Code: Select all

<!-- IF S_SHOW_HOMEPAGE and U_HOMEPAGE --><li class="icon-home"><a href="{U_HOMEPAGE}" <!-- IF U_HOMEPAGE_TITLE -->title="{U_HOMEPAGE_TITLE}"<!-- ENDIF --><!-- IF S_SHOW_HOMEPAGE_IN_NEW -->onclick="window.open(this.href); return false;"<!-- ENDIF --> accesskey="y">{L_HOMEPAGE}</a></li><!-- ENDIF -->

inline before

Code: Select all

<li class="icon-home">
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: help with install

by ronled » Tue Dec 28, 2010 1:38 pm

Well, I get this error with the new file in Automod

Code: Select all

Cannot locate File: ./../store/mods/Add_Homepage_Link_1.0.8//Add_Homepage_Link_1.0.8/contrib/subsilver2.xml


I just now restored back from previous backup.

I'm back at the spot where I've installed it once where the message was the original sql errors then uninstalled and have the ACP entries showing but don't work. To be clear, I'm back at the beginning of my initial post to you.
ronled
Registered User
Posts: 27
Joined: Tue Dec 21, 2010 2:53 am
Contact:

Re: help with install

by ChriZathens » Tue Dec 28, 2010 1:50 pm

Ohhh, my bad..
I removed the contrib folder, but Automod must be checking for it since links for additional files exist in the install_mod.xml...
Please use this zip:
Add_Homepage_Link_1.0.8.zip
(83.94 KiB) Downloaded 189 times
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris

Re: help with install

by ronled » Tue Dec 28, 2010 2:17 pm

BINGO! That did the trick. Thank you.

I don't ever plan to uninstall... BUT... if I ever do... will the ACP entries be deleted through Automod or not.

Thank you again ever-so-much for the attention you've placed to assist. It is GREATLY APPRECIATED!!

Oh... is there a way to add another link as I have a online store (wife's site actually) and would be great to have that link next to Homepage.

Do you recommend a good (and simple) banner ad mod??

All the best!

Ron
ronled
Registered User
Posts: 27
Joined: Tue Dec 21, 2010 2:53 am
Contact:

Re: help with install

by ChriZathens » Tue Dec 28, 2010 3:08 pm

Normally, Automod will revert your files back from before the installation. But I really cannot be sure because I only use Automod to verify that my mods do install with it, since it is a requirement for a mod to be validated.
I personally prefer to install/uninstall manually. But you can ask in the Automod support thread...
To add another link, if you want it to be configurable via the ACP, too, it is not an easy task.. You will actually have to edit the mod install file and alter all instances of homepage to eg homepage2, the lang file to eshop and the database entries so that they won't be the same as the existent ones...
Doable, but can easily lead to mistakes...
I'd suggest you do the following:
Download styles/proDark/template/overall_header.html
Open it with a text editor (eg Notepad ++ that I mentioned before)
Find

Code: Select all

<ul class="linklist navlinks">

Add, after, in a new line:

Code: Select all

            <li class="icon-home"><a href="http://www.phpbb.com">eshop</a></li>
(change http://www.phpbb.com to whatever link you like and eshop to whatever you like)
Save the file, upload it back to your site and refresh your templates via ACP.
You will end up with this:
img.jpg
img.jpg (5.27 KiB) Viewed 632 times

See if this fits you.. If you prefer it to be fully configurable via ACP, then I can probably modify the existing mod for you and you will be able to install it via Automod, but perhaps tomorrow, because I must go offline now...
Cheers...

P.S.: I don't use any ad management in my forums, but from what I have heard Exreaction's advertisement management is very good. You can also search the customization db for other advertisement mods..
My mods in MODDB:
Add Homepage link in header - Change user activity post limit - Post number in viewtopic
If you need support click on the support tab there and post your question.
Do not PM me - chances of viewing my PMs are way thinner than viewing the support question in the customization DB...
User avatar
ChriZathens
Registered User
Posts: 1477
Joined: Tue Apr 18, 2006 9:11 pm
Location: Athens, Greece
Name: Chris