WebSite X5Help Center

 
David W.
David W.
User

Including PHP into a Text Page  en

Autore: David W.
Visite 1820, Followers 1, Condiviso 0  

HI All,

I'm very new to WebsiteX5 (purchased yesterday) and I'm already very impressed. I'm aiming to move over from XSitePro which I've have endless problems with (and there doesn't seem to be any further development on it anyway)

I have a question which I'm sure someone will be able to help with.

On my existing website I include a download counter as a script, how would I do it in WebsiteX5?

<td style="BACKGROUND-COLOR: #c0c0c0"

valign="top"

align="left">

<p>TIN001<scripttype='text/javascript'src='http://dstats.net/dstatsjs.php?file=http://www.omniprove.co.uk/custom-1/TIN001-1207 v1r0.pdf'></script></p>

</td>

I've enabled HTMP code on the Text Object page, but not sure this is what I really want.

Any help would be very much appreciated.

Many thanks

Dave

Postato il
10 RISPOSTE - 1 CORRETTO
Andre E
Andre E
Moderator

You can set it in a text box using html code option, other options are, use a htmlcode object on your page.

Or use a html box inside your footer or header.

For the counter I would suggest let it generate only html, this is the easyest way.

Leggi di più
Postato il da Andre E
Anthony A.
Anthony A.
User

David, what is your website address?

if this post is the correct answer, please mark this answer as correct answer.

------------------------------------------------------------

Good Luck
http://www.usx5host.com (6 months free Web Host for x5 users, promo code: usx56m)
http://www.usx5.com (Templates and support for x5)
http://www.wdesigners.us

Leggi di più
Postato il da Anthony A.
David W.
David W.
User
Autore

Hi, thanks for the replies.

I can't put it in the header or footer and I want the script embedded in the text as per my existing page.

The page I'm trying to implement is (note this is how it currently is using XSitePro)

http://www.omniprove.co.uk/TickITplus-Implementation-Notes.html

and the counters are in the 4th Column, one for each row, so that when someone downloads a TINxxx it counts them.

I set the Enable HTML code on in the Text Object for a page and inserted the <script .... etc., as above) but all I get is the script in text.

Thoughts?

Many thaks

Dave

Leggi di più
Postato il da David W.
Anthony A.
Anthony A.
User

I see what you saying.

I remember back in the day (2008 or 9) I bought the program (xsitepro), after 1 week I ask for refund duo to messy codding behind the pages.

David,

you need to find your key script which I believe is

"<script type='text/javascript'>[removed](dsCounter);</script>"

create your tables (with table object) and add your text, then link them to your source, then try to add the counter to your columns see what will happened.

you can add code inside the table object by enabling the code insert, just click on the tab look like this  </>

don't forgot if any script need to be added in header or body of your page.

if this post is the correct answer, please mark this answer as correct answer.

------------------------------------------------------------

Good Luck
http://www.usx5host.com (6 months free Web Host for x5 users, promo code: usx56m)
http://www.usx5.com (Templates and support for x5)
http://www.wdesigners.us

Leggi di più
Postato il da Anthony A.
Anthony A.
Anthony A.
User

btw, I click on TIN005 for more than 3 times but you counter still shows 87 inside your website!

------------------------------------------------------------

Good Luck
http://www.usx5host.com (6 months free Web Host for x5 users, promo code: usx56m)
http://www.usx5.com (Templates and support for x5)
http://www.wdesigners.us

Leggi di più
Postato il da Anthony A.
David W.
David W.
User
Autore

Hi Anthony,

Thanks for the reply. Actually that is what I did but it doesn't seem to work always, although I did get it to work once last nioght. I'm really not sure what I've doing to get it to work. I do have the enable code insert enabled.

I just copied the code from XSitePro (agree with your comments BTW) and pasted it into WebsiteX5.

<script type='text/javascript'>[removed](dsCounter);</script>

and this is what I get if I preview it

<script type='text/javascript'>[removed](dsCounter);script>

Notice the missing < at the end of the line and the text is the same colour as in XSitePro, text is red and script is brown.

If I type the code in directly to websiteX5 it seems to work and I actually get a count value.

Could there be some text formatting issues/conditions between XSitePro and WebsiteX5? I think I tried last night copying from XSItePro into Notepad and then copying from Notepad into WebsiteX5 and it worked, although it was getting late.Also, I took a look at the counter and yes I see it also stay static when I click on the items, not sure what is going on here as the counters have been going up - however, that is not a WesiteX5 issues so will look into this seperatly - thanks for letting me know.

Dave

 

X

Leggi di più
Postato il da David W.
David W.
David W.
User
Autore

P.S. Not sure where the X came from........and not sure how to edit a post......sorry

Leggi di più
Postato il da David W.
Anthony A.
Anthony A.
User

yeah, there is no edit,lol

try to make it work in your old website, and let me know when its fully functional, so I will give it another try to see can we make it work in websitex5 or not.

------------------------------------------------------------

Good Luck
http://www.usx5host.com (6 months free Web Host for x5 users, promo code: usx56m)
http://www.usx5.com (Templates and support for x5)
http://www.wdesigners.us

Leggi di più
Postato il da Anthony A.
David W.
David W.
User
Autore

HI Anthony,

Its not the updaating that is the problem, that has worked in the past. But, its just getting the script into the text page.

I did a little more experimenting and it definitely appears to be a copy problem. If I copy the script from XSitePro and paste it into WebsiteX5 it doesn't work (as above). But if I just type the exact same text in to WebsiteX5 it works. Therefopre I need to go through Notepad to 'remove' whatever it is that gets copied from XSitePro.

Thanks for your help.

Dave

Leggi di più
Postato il da David W.
Anthony A.
Anthony A.
User

your welcome, some times copy/paste acting wierd, just use a notepad in between to keep the code without extra style, etc.

I think it should work, if for some reason didnt work, you can always recreate the codes from http://dstats.net and copy them again.

if this post is the correct answer, please mark this answer as correct answer.

------------------------------------------------------------

Good Luck
http://www.usx5host.com (6 months free Web Host for x5 users, promo code: usx56m)
http://www.usx5.com (Templates and support for x5)
http://www.wdesigners.us

Leggi di più
Postato il da Anthony A.