Excellent set of widgets Siran, worked like a charm. Saved to my web-goodies folder.
Excellent set of widgets Siran, worked like a charm. Saved to my web-goodies folder.
Egg
Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host
Sculptex/Siran
I placed the php file in the same subfolder I uploaded the index pages to alongside the image folder.Egg, did you place the file and folder in the root? Does your sever support PHP?
Yes, never had issues with php files before:
http://www.parkeston.com/random/phpinfo.php
Egg
Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host
Because I can't get a double url on TG server:
http://www.parkeston.com/random/random.php
Egg
Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host
Whereas Sculptex's works as expected:
http://random.prevoo.uk/random.php
Egg
Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host
The subdoman is not important, if you are using a subfolder then that's fine, you just need to create another folder within that called random with the images in.
So you'd have:-
public_html/random/index.htm
public_html/random/random.php
public_html/random/random/img1.jpg
public_html/random/random/img2.jpg
But Siran and Acorns solutions are better for xara anyway.
sculptex, that is a generous suggestion but the power of TalkGrpahics is its diversity - let's say three solutions for the OP to pick from.
I would be interested if JDunn can advise which work for the posed question.
I hope others will also try and advise back or propose their approach.
I'm obviously plugging mine as it can be changed to reflect siran's excellent solutions be including CSS styles separately and even replace the random element with a timer to cycle round as a carousel.
Acorn
Acorn - installed Xara software: Cloud+/Pro+ and most others back through time (to CC's Artworks). Contact for technical remediation/consultancy for your web designs.
When we provide assistance, your responses are valuable as they benefit the community. TG Nuggets you might like. Report faults: Xara Cloud+/Pro+/Magix Legacy; Xara KB & Chat
Hi sculptex,
I don't think your solution has any disadvantage to the others, except depending on PHP. But if your server supports PHP your solution has the advantage that replacing the images is as easy as deleting and adding files from/to a folder.
Just put your random.php file and the random folder (containing the pictures) to a support folder and it is as good for Xara as the other solutions.
After adding and/or removing pictures to/form "your support folder"/random all you need to do is re-publish or export (and later upload with FTP or such) from within Xara.
Attached is the "cover" variant of the widget examples above of your code (uploaded as a zip file because of the support folder).
The following is meant to be addressed to other readers as I guess sculptex already knows everything about it...
To change the scaling (just as Acorn already mentioned) change the "background-size:cover;" in the placeholder code to your needs (or give your DIV a class or ID and add some CSS).
Remove it to only center and no scaling,
change it to "background-size:contain;" to fit inside the placeholder,
or to "background-size:100% 100%;" to fully stretch loosing the aspect ratio,
or to "background-size:auto 100%;" to scale to same height,
or to "background-size:100% auto;" to scale to same width.
You may also change other attributes such as "background-position:center center;" to "background-position:left top;" (see for example https://www.w3schools.com/cssref/pr_...d-position.asp).
Maybe there are other useful values... Acorn or sculptex might know better.
Finally found my problem after a few hours searching. I need to add this line to my .htaccess file
Found it from this threadAddType application/x-httpd-php .htm .html
Egg
Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host
Glad you figured it out, but I don't understand why that was necessary.
Nor do I Siran, it was just that pasting in even a very simple php code into a placeholder didn't function. It does now.
Egg
Minis Forum UM780XTX AMD Ryzen7 7840HS with AMD Radeon 780M Graphics + 32 GB Ram + MSI Optix Mag321 Curv monitor + 1Tb SSD + 232 GB SSD + 250 GB SSD portable drive + ISP = BT + Web Hosting = TSO Host
Bookmarks