GenoPro Home
GenoPro Home  |  Get Started With My Genealogy Tree  |  Buy  |  Login  |  Privacy  |  Search  |  Site Map
 

GenoPro Support Forum




Author Add buttons to heading htm
Posted Tuesday, August 25, 2015 - Post #35489
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Saturday, March 14, 2020
Posts: 365, Visits: 3,680
with the old 2007 skin I was able to add three buttons that I had adapted myself from other GenoPro buttons in order to open three new toc_ pages and a flag gif to open my web site.
I was able to add the links after the existing GenoPro buttons, added the report instructions to the Config.xml and then created the three toc pages.
This all worked nicely but with the new 2015 Narrative report, I can't seem to get the buttons to work without causing the other functions to freeze.
The old heading.htm shows the buttons but doesn't seem to be compatible with the new report.
My "Tree_Compilation" shows the buttons and flag in the old template.
Please could you suggest how I can adapt the "heading.htm" to my needs.

http://familytrees.genopro.com/IainTait/Tree_Compilation/images/toc_ged.jpg   http://familytrees.genopro.com/IainTait/Tree_Compilation/images/password.jpg   http://familytrees.genopro.com/IainTait/Tree_Compilation/images/toc_djvu.jpg  http://familytrees.genopro.com/IainTait/Tree_Compilation/images/flag.gif
Posted Wednesday, August 26, 2015 - Post #35493
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 5 hours ago
Posts: 3,323, Visits: 25,490
You should be able to add custom buttons by adding extra lines to heading.htm after line 46 using line 46 as a template.

e.g. add

<a href="my_toc.htm" onclick="javascript:tocShow();"><img class="button32" src="images/my_toc.gif" alt='@[Report.WriteText "My tool tip text"]@' title='@[Report.WriteText "My tool tip text"]@'/></a>

the button image should be placed in Code\themes\Default\files\images

When writing the 'toc' script (e.g. my_toc.htm in the above example) I suggest you refer to an existing 'toc' script such as toc_places.htm as a guide.

For example it is probably important to have 

<script type='text/javascript' src="scripts/tocstart.js"></script>

at the end of the <head> section.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Wednesday, August 26, 2015 - Post #35496
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Saturday, March 14, 2020
Posts: 365, Visits: 3,680
Thanks Ron for the tips. 
I was almost  half way there but I noticed that the report buttons don't work on the default page untill I press the "Home " button first, even in the virgin 2015 Report without changes.
I will try your suggestion and let you know how I get on.
I have been away for a while due to illness but see you have changed your profile. I was looking for Ron with the kids image!
I remember the days when I complained that I had to copy and paste place names into the source code so many years ago before you revolutionised the report generator.
Brilliant work!
Posted Thursday, August 27, 2015 - Post #35498
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 5 hours ago
Posts: 3,323, Visits: 25,490
If you look closely you will note the first set of achors are for icon buttons and the second set for text buttons. If you are using icon buttons place yours just after the first Help button i.e. between lines 99 and 100.


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Thursday, August 27, 2015 - Post #35501
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Saturday, March 14, 2020
Posts: 365, Visits: 3,680
Thanks, I've almost got it.
The fourth button "PW" , the login page, won't open as a toc file on the left nor the web link when the code onclick="tocShow();"  is included, so I have now put  target= "_parent"  for the web site as it is too wide for the left panel, but I would like the PW page to open on the left like the first three do, I have put my code between the lines 99 and 100 as you suggested and show it below :-

<%[
End If
]%>
<a href='help.htm' target='detail'><img class="button32" src='images/help32.gif' alt='@[Report.WriteText StrDicExt("AltHelpPage","","Using this 
Line 99                   website","","2010.12.10")]@' title='@[Report.WriteText StrDicExt("AltHelpPage","","Using this website","","2010.12.10")]@'/></a>

                               <a href="toc_ged.htm" onclick="tocShow();"><img src="images/toc_ged.jpg" alt='Display all gedcom files in the report' title='Gedcom Files for Download'></a>

                               <a href="toc_gno.htm" onclick="tocShow();"><img src="images/toc_gno.jpg" alt='Display all gno files in the report' title='Family Gno Files for Download'></a>                        

                                <a href="toc_djvu.htm" onclick="tocShow();"><img src="images/toc_djvu.jpg" alt='Display all Group Portraits' title='Family and Wedding Group Portraits'></a>

                               <a href="toc_login.htm" onclick="tocShow();"><img src="images/password.jpg" alt='Display Password Login Page' title='Private Tree Password Login Page'></a>


                               <a href="http://www.beath.net/" target="_parent"><img border=top"0" src="images/flag.gif"  width="50" height="32" alt='Home Page - www.beath.net' title='Home Page - www.beath.net'></a>
        
Old Line 100           </div>
               <%[Else]%>
       <ul id="menu">
<li>
Some little bit of code must be missing but all my first four  links are the same. 



Edited: Thursday, August 27, 2015 by IainTait
Posted Thursday, August 27, 2015 - Post #35505
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 5 hours ago
Posts: 3,323, Visits: 25,490
If it is just an issue with the width of the index frame for the toc then you could try adjusting line 46 of default.htm, currently

saveLower=saveLower2="30%,*";


e.g. try changing 30% to 35%

Otherwise I assume you are familiar with browser Developer Tools for debugging?  Just press F12 and view the console >_ for errors.  I use Chrome but Firefox and IE also have debugging features.

BTW, glad to see you back and hope your health is good now.

rgds,

Ron


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Friday, August 28, 2015 - Post #35507
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Saturday, March 14, 2020
Posts: 365, Visits: 3,680
I tried the first change from saveLower=saveLower2="30%,*";  to saveLower=saveLower2="35%,*"; and used <br> to split the two longer text lines to shorten them, but the toc_login.htm still insists on opening in the main window.
The other three toc pages open as normal even though the text is now wider than the login page.
I have just changed the target for my web site link from   target="new"> to  onclick="tocShow();">  and it opened on the left frame like all the others except login, and the page size is wide for the web site pages and a bottom scroll appears.
This would indicate that it is not the text width causing the problem.
I even put the login before the others but it still opens in the main page.
The F12 button doesn't seem to work
Here are two of my links, the first one opens on the left but the second doesn't



 <a href="toc_djvu.htm" onclick="tocShow();"><img src="images/toc_djvu.jpg" alt='Display all Group Portraits' title='Family and Wedding Group Portraits'></a>


 <a href="toc_login.htm" onclick="tocShow();"><img src="images/password.jpg" alt='Display Password Login Page' title='Private Tree Password Login Page'></a>

Edited: Friday, August 28, 2015 by IainTait
Posted Friday, August 28, 2015 - Post #35508
Legendary Master

Legendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary MasterLegendary Master

Administrators
Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.1.0.1

Last Login: 5 hours ago
Posts: 3,323, Visits: 25,490
Maybe tocstart.js not executing. Perhaps it needs to precede some of your other scripts?


'lego audio video erro ergo disco' or "I read, I listen, I watch, I make mistakes, therefore I learn"
Posted Friday, August 28, 2015 - Post #35513
Famous Writer

Famous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous WriterFamous Writer

Customers
Important Contributors
FamilyTrees.GenoPro.com
GenoPro version: 3.0.1.5

Last Login: Saturday, March 14, 2020
Posts: 365, Visits: 3,680
I tried putting the Script line you suggested at the bottom of the head section of the heading.htm as below after the two already there
<script type='text/javascript' src="scripts/jquery.min.js"></script>
<script src="scripts/script.js" type="text/javascript"></script>
<script type='text/javascript' src="scripts/tocstart.js"></script>
 but it made no difference, I also tried to change the target of the link from
<a href="toc_djvu.htm" onclick="tocShow();">  to <a href="toc_djvu.htm" target="toc"> and <a href="toc_djvu.htm" target="detail">
but these had no effect either and I even tried to put the script before the login ling as below but this also had no effect
 <a href="toc_djvu.htm" onclick="tocShow();"><img src="images/toc_djvu.jpg" alt='Display all Group Portraits' title='Family and Wedding Group Portraits'></a>
<a href="toc_djvu.htm" onclick="tocShow();">
<a href="toc_login.htm" onclick="tocShow();"><img src="images/password.jpg" alt='Display Password Login Page' title='Private Tree Password Login Page'></a>

I have finally I have found the problem!
In the toc_login.htm there was the text in the head

<script>
if (self.location != top.location) top.location = self.location;
</script>

Which I have replaced with

<script type='text/javascript' src="scripts/tocstart.js"></script>

and it works at last.

I have since found that by removing the text <script type='text/javascript' src="scripts/tocstart.js"></script>  it still works so the culprit was the "self location" script above I removed.
My trouble is that my coding knowledge is limited, never having studied formally but only by trial and error with mostly errors

Edited: Friday, August 28, 2015 by IainTait


Similar Topics

Click to view RSS...
Expand / Collapse

Reading This Topic

Expand / Collapse