rakelbara 0 Report post Posted June 23 Hello I was wondering if someone here has figured out how to display a random photo from TNG in the WP installation? I can't figure out how to do it myself, but would love to be able to have that function on my site :) Best regards Rakel Share this post Link to post Share on other sites
PeterC66 0 Report post Posted June 24 Within my WordPress/TNG site I have a little personal Mod that introduces an ability to call getperson.php with the parameter “Random”. I am happy to send you a copy but cannot do much support for it. You can see it in use on my site (hcnhistory.org.uk) by selecting the People/Random Choice menu item. On refreshing, you get a different person each time. I am sure it could be adapted for a pure TNG site, and to display a random photo, but I have a feeling I was inspired to write it some years ago because some TNG template or site was able to show random photos. Peter Share this post Link to post Share on other sites
HeatherFeuer 0 Report post Posted June 24 Hi Rakel, Go to https://uniquelyyourshosting.net and scroll to the bottom; check bottom right. Is that what you had in mind? I have reworked the TNG Widgets WordPress plugin so that it works independently from the TNG-WordPress plugin. you can download the plugin here: https://uniquelyyourshosting.net/tng-wordpress-plugins/. Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 24 2 hours ago, PeterC66 said: Within my WordPress/TNG site I have a little personal Mod that introduces an ability to call getperson.php with the parameter “Random”. I am happy to send you a copy but cannot do much support for it. You can see it in use on my site (hcnhistory.org.uk) by selecting the People/Random Choice menu item. On refreshing, you get a different person each time. I am sure it could be adapted for a pure TNG site, and to display a random photo, but I have a feeling I was inspired to write it some years ago because some TNG template or site was able to show random photos. Peter Thanks Peter, your solution is certainly interesting but I was looking for more in line with what Heather suggests. But thanks for taking the time to reply to me Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 24 2 hours ago, HeatherFeuer said: Hi Rakel, Go to https://uniquelyyourshosting.net and scroll to the bottom; check bottom right. Is that what you had in mind? I have reworked the TNG Widgets WordPress plugin so that it works independently from the TNG-WordPress plugin. you can download the plugin here: https://uniquelyyourshosting.net/tng-wordpress-plugins/. Hello Heather Yes that is exactly what I was looking for. Do you happen to know how I would go about centering the text/image in the widget? Also is it possible to change the language? I use TNG mostly in Icelandic you see Share this post Link to post Share on other sites
HeatherFeuer 0 Report post Posted June 24 1 hour ago, rakelbara said: Hello Heather Yes that is exactly what I was looking for. Do you happen to know how I would go about centering the text/image in the widget? Also is it possible to change the language? I use TNG mostly in Icelandic you see Oh. I need to research how to update the plugin for the language variables. As for the centering, in your theme's customizer, add this to the CSS: .tng-profile-photo { margin-left: 40%!important; } .tng-profile-years, .tng-profile-name {text-align: center;} You can see that change at https://uniquelyyourshosting.net. Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 24 Thank you so much! This is exactly what I needed. It would be great if it could be in a different language though, but this is still excellent 😄 Share this post Link to post Share on other sites
HeatherFeuer 0 Report post Posted June 24 I did find a plugin called Loco Translate. You might try that for now. I have a lot going on, so I don't have a significant block of time at the moment to work on this. I need to read through the Developer's Handbook for WordPress plugins to understand exactly how to code for languages. I'm glad you like the plugin. Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 24 Sorry for being a bother, but I just noticed that the plugin depends on me using the TNG-plugin, which I don't. Is it complex to change the URL prefx from www.URL.com/database to something else? For me it would be https://www.legstadaleit.com/db/?iframe=www.legstadaleit.com/tng/ because I use an iframe instead of the TNG-plugin. I tried using the plugin, but my site got really really slow so I had to find another solution.Thanks again. Share this post Link to post Share on other sites
klooster 0 Report post Posted June 24 There are a lot of random images plug-ins available for Wordpress, check this link for some of the best: Best random images WP plugin Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 24 4 minutes ago, klooster said: There are a lot of random images plug-ins available for Wordpress, check this link for some of the best: Best random images WP plugin Yes I know, but I don't know how to pull the name and the birthday and deathdate from the database so that it is displayed with the image, unfortunately. Share this post Link to post Share on other sites
klooster 0 Report post Posted June 24 Put the name, birthdate and deathdate in te caption of the photos you want to display Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 24 Just now, klooster said: Put the name, birthdate and deathdate in te caption of the photo you want to display How do I do that for a random photo? is there something I am missing? Share this post Link to post Share on other sites
klooster 0 Report post Posted June 24 Pick for instance 20 random photos you want to display, in WP make a caption for each of the photos. Use one of the WP random images plugins to display those random 20 photos. Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 24 That's a good idea, thanks for the tip Share this post Link to post Share on other sites
klooster 0 Report post Posted June 25 25 Best Free WordPress Carousel Plugins for 2022 Share this post Link to post Share on other sites
mahesh 0 Report post Posted June 25 I have been using a modified Super transition slideshow on my test site, for a long time. It has been modified to fetch images from a special folder, deceased, in the photo section. Let me know if you are interested. Ohh.. and My home page uses random photo (deceased only). This embedded as template . I am working on shortcode constructor, at the moment. Perhaps I should add a shortcode for that. Share this post Link to post Share on other sites
HeatherFeuer 0 Report post Posted June 25 Quote I use an iframe instead of the TNG-plugin. Oh! You don't need to do that! My sites don't -- you should use the Kloosterman method instead! Do you know how to do that? Share this post Link to post Share on other sites
klooster 0 Report post Posted June 25 I completely agree: iFrames are obsolete for page layout. Never use them instead of good CSS layout, even table-based layout is better. Good reasons for using iframes are: ads: adwords for example uses this technique, it is good for encapsulating - ad css won't destroy your page. hidden iframe: it can be used for hundreds usable things, like tracking, ajax-alternative, etc If you want to use my integration method, here is the “how to” link: TNG and WP integration Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 25 I use a wp-plugin that is called Advanced Iframes that gives more options than regular iframes. I tried the Kloosterman approach and the TNG plugin and while I can´t remember what was the issue with the Kloosterman approach, the TNG plugin gave me an INCREDIBLY slow site. Like really really REALLY slow. So in the end I went back to this plugin. I am on disability and have limited programming skills and I can't afford to pay to get help and this was the only way I could get things to work. Share this post Link to post Share on other sites
rakelbara 0 Report post Posted June 25 I think I couldn't get the Kloosterman method to work... Share this post Link to post Share on other sites
HeatherFeuer 0 Report post Posted June 25 14 minutes ago, rakelbara said: I think I couldn't get the Kloosterman method to work... What theme are you using? It really is quite easy. And TNG plugins will work with it. If you would like help, I offer integration services here: https://clients.uniquelyyourshosting.biz/order/main/packages/wptngintegration/?group_id=3 Share this post Link to post Share on other sites
klooster 0 Report post Posted June 25 The Kloosterman method of TNG-WP integration is my idea, I developed it in a good working WP-TNG integration with a detailed manual how to install it on my website and on the TNG-WIKI. I offer het free to use for everyone, so I am a bit surprised to read that you are using my method and asking money for it. Share this post Link to post Share on other sites
HeatherFeuer 0 Report post Posted June 25 25 minutes ago, klooster said: The Kloosterman method of TNG-WP integration is my idea, I developed it in a good working WP-TNG integration with a detailed manual how to install it on my website and on the TNG-WIKI. I offer het free to use for everyone, so I am a bit surprised to read that you are using my method and asking money for it. Oh, Cees... I ONLY charge for the service of setting up the integration for those who either can't get it to work for themselves or don't want to do it themselves. The service also includes a bit more than just setting up the integration. I'm sorry if you misunderstood. Share this post Link to post Share on other sites
klooster 0 Report post Posted June 25 No problem Heather, thanks for your explanation. I was just a bit surprised. Share this post Link to post Share on other sites