This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 10 - Pages: 1 - Last Post: 31-Mar-2019 17:39 Last Post By: hmonnier Threads: [ Previous | Next ]
hmonnier

Posts: 21
Registered: 14-Oct-2007
Merging custom code
Posted: 30-Mar-2019 21:02
 
  Click to reply to this thread Reply
Is there a way to insert custom code (html) into the skin?

For example I wish to insert a line of custom code, html, to increment a counter for each visit. I can see where it would go in the header.inc code, i think. I could be anywhere after the generated '<body' statement.

Currently i must remember to edit the index.html generated code prior to sending to the server. and i do forget every now and then...

alternatively, does anyone know of a 'patcher' where its smart enough to use the statement line #, achieved by counting the lines of the generated html, file to that point (line #) and then inserting code there. another possible way to address the issue.

I currently manually make several changes to the generated code after the F9 and before the server transfer.

yes I might be able to learn how to produce a skin, and do it correctly, but my old mind does not do as well as it used to, when i was coding for a living..... many moons ago.....

Thanks, Henri Monnier.
jGromit

Posts: 7,502
Registered: 31-Jan-2006
Re: Merging custom code
Posted: 30-Mar-2019 21:33   in response to: hmonnier in response to: hmonnier
 
  Click to reply to this thread Reply
Just insert the code under Tiger > Site > Custom Code > <BODY> The code will be inserted before the closing tag of the body section.

But if you want to keep track of visits, why not use Google Analytics, which is designed for that purpose?
hmonnier

Posts: 21
Registered: 14-Oct-2007
Re: Merging custom code
Posted: 31-Mar-2019 14:48   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Morning,

I have tried this using various fomats (footer example):
<p>For any errors or omissions, please email to <a href="mailto:webmaster@Club-A-Models.com">webmaster@Club-A-Models.com</a></p>
After F9 build this does not show in the generated index.html

so obviously, i most likely have the syntax incorrect. i expect it to be at the bottom of the footer, just above the </footer> statement, where I currently patch it in. works fine that way. but would like to be able to automate as much as possible.

Additionally, there are some things that I would like to eliminate on the first page, they are not used, and i'd prefer them not to be there, and i see no way to eliminate them without manual patching.

Henri

Edited by: jGromit on 31-Mar-2019 09:10, to insert "code" tags
jGromit

Posts: 7,502
Registered: 31-Jan-2006
Re: Merging custom code
Posted: 31-Mar-2019 15:15   in response to: hmonnier in response to: hmonnier
 
  Click to reply to this thread Reply
Attachment ss005291.png (341.9 KB)
If I insert that HTML under Tiger > Site > Custom code > <BODY>, I get what you see in the attached screenshot.
jGromit

Posts: 7,502
Registered: 31-Jan-2006
Re: Merging custom code
Posted: 31-Mar-2019 15:17   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Attachment ss005292.png (216.1 KB)
And if I insert it, instead, under Tiger > Footer > Custom content, I get this. Even better, since it needs no further formatting.
hmonnier

Posts: 21
Registered: 14-Oct-2007
Re: Merging custom code
Posted: 31-Mar-2019 15:23   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Attachment footerinsert.jpg (66.0 KB)
Well I'm doinf something wrong, which i've never doubted. attached is what is in the custom footer.
jGromit

Posts: 7,502
Registered: 31-Jan-2006
Re: Merging custom code
Posted: 31-Mar-2019 15:27   in response to: hmonnier in response to: hmonnier
 
  Click to reply to this thread Reply
That will work. Standard instructions (repeated a thousand times in here): make the album again, ensure that you are not just processing updated subdirectories, and refresh your browser cache when viewing the results.
hmonnier

Posts: 21
Registered: 14-Oct-2007
Re: Merging custom code
Posted: 31-Mar-2019 15:38   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
Will try all that, As for your earlier suggestion about stats, the server that I have been using for years, has a great stats package, and many other tools/options that can be easily incorporated with into your code. I do most all my development stuff with DreamWeaver, been with them from before it was bought out. jAlbum is a great package, which i use exclusively for photographers, and several catalogs that i support.

Appreciate your help... Will try again after breakfast, the bride has gotten up.....

Thanks, Henri Monnier
hmonnier

Posts: 21
Registered: 14-Oct-2007
Re: Merging custom code
Posted: 31-Mar-2019 17:33   in response to: hmonnier in response to: hmonnier
 
  Click to reply to this thread Reply
gonna have to build a batch file to clear out all that stuff every time i do an F9. Caught again by that issue.

This will work for most of the changes, but will not address the other item of removing. I'll put together an example of something i wish to edit out. I think to remove it other than by patching I'd have to know a great deal more about skin development....

Later, and thanks again...
Henri
jGromit

Posts: 7,502
Registered: 31-Jan-2006
Re: Merging custom code
Posted: 31-Mar-2019 17:36   in response to: hmonnier in response to: hmonnier
 
  Click to reply to this thread Reply
Any time you find yourself doing any manual editing of the completed album, you are probably doing something the hard way. This is rarely necessary.
hmonnier

Posts: 21
Registered: 14-Oct-2007
Re: Merging custom code
Posted: 31-Mar-2019 17:39   in response to: jGromit in response to: jGromit
 
  Click to reply to this thread Reply
i'll supply 1 sample example when i get out of the shop. Have orders to get out.... monday morning....
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums