Ryoma27 Posted October 29, 2020 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 29 Reputation: 1 Joined: 10/20/20 Last Seen: February 26 Share Posted October 29, 2020 hello, please help how to configure thor patcher showing my news page in built in news in fluxcp? Link to comment Share on other sites More sharing options...
0 AAlice Posted November 1, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 2 Reputation: 1 Joined: 09/12/20 Last Seen: November 15, 2023 Share Posted November 1, 2020 (edited) In Thor's config.ini file you can set the URL to the page that you want to display in the patcher's box, for example a page called news: [NoticeBox:Box0] Width=347 Height=250 Left=21 Top=217 URL='http://www.YOURRO.net/example/news.php' Are you using the pages/news plugin for your Flux CP? If so, I assume using that URL will probably show the full page, not just the part with the news. In that case one solution could be to: 1. create a new page in a folder of your choice on your server, 2. there, include just the news part of your regular news page with an iframe, or jQuery load the div of your news, 3. and use the URL of your new page in the config.ini instead. I'm not using the news plugin though, so I don't know if there isn't better way. Edited November 1, 2020 by AAlice Link to comment Share on other sites More sharing options...
0 Ryoma27 Posted November 2, 2020 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 29 Reputation: 1 Joined: 10/20/20 Last Seen: February 26 Author Share Posted November 2, 2020 20 hours ago, AAlice said: In Thor's config.ini file you can set the URL to the page that you want to display in the patcher's box, for example a page called news: [NoticeBox:Box0] Width=347 Height=250 Left=21 Top=217 URL='http://www.YOURRO.net/example/news.php' Are you using the pages/news plugin for your Flux CP? If so, I assume using that URL will probably show the full page, not just the part with the news. In that case one solution could be to: 1. create a new page in a folder of your choice on your server, 2. there, include just the news part of your regular news page with an iframe, or jQuery load the div of your news, 3. and use the URL of your new page in the config.ini instead. I'm not using the news plugin though, so I don't know if there isn't better way. let say i have URL='http://www.YOURRO.net/?module=news even if i create new page in news, this is always the link given, and yes you are correct the thor patcher shows a full page, can you give me tutorial or example? thanks Link to comment Share on other sites More sharing options...
0 AAlice Posted November 3, 2020 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 2 Reputation: 1 Joined: 09/12/20 Last Seen: November 15, 2023 Share Posted November 3, 2020 (edited) I don't think you can use your http://www.YOURRO.net/?module=news link, because it will always show all of your page. You need to create a separate page. I just tried it with the jQuery approach on my test server and it seems to work. Just a disclaimer ahead, I am not a web developer.Here's what I did: 1. Create a folder in your folder structure. I created it in the root directory of my FluxCP and named it patchernews 2. Create a page in your new folder. I named it news.html 3. Add these lines of code to your new page: <html> <link rel="stylesheet" href="style.css" type="text/css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#newsbox").load("http://www.YOURRO.net/ #newscontent"); }); </script> <div id="newsbox" style="width: 600px"></div> </html> What we do here is place a div with the ID "newsbox" on our new page. Set width: 600px to the width of your notice box in the Thor patcher. We then load the content of your news from the URL "http://www.YOURRO.net #newscontent". Set the URL to wherever your news are displayed on your site, but keep #newscontent. Of course, this only works if you have a div on this page with the ID newscontent. 4. So we will wrap a div with the ID newscontent around your news table. Go to the page where your news are displayed and place <div id="newscontent"> at the beginning and </div> at the end. 5. Go back to news.html and link to the stylesheet you wanna use. Replace href="style.css" with e.g. "../themes/default/css/flux.css" if you are using the default theme of FluxCP. You can also create a new style.css file in this folder and style the page yourself. This way you have more control over how exactly it should look in that small notice box within the patcher. 6. Change the URL for the notice box in Thor's config.ini to 'http://www.YOURRO.net/patchernews/news.html' Let me know if it works. Edited November 3, 2020 by AAlice 1 Link to comment Share on other sites More sharing options...
0 Akkarin Posted November 7, 2020 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: April 15 Share Posted November 7, 2020 On 11/3/2020 at 2:19 PM, AAlice said: I don't think you can use your http://www.YOURRO.net/?module=news link, because it will always show all of your page. You need to create a separate page. I just tried it with the jQuery approach on my test server and it seems to work. Just a disclaimer ahead, I am not a web developer.Here's what I did: 1. Create a folder in your folder structure. I created it in the root directory of my FluxCP and named it patchernews 2. Create a page in your new folder. I named it news.html 3. Add these lines of code to your new page: <html> <link rel="stylesheet" href="style.css" type="text/css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#newsbox").load("http://www.YOURRO.net/ #newscontent"); }); </script> <div id="newsbox" style="width: 600px"></div> </html> What we do here is place a div with the ID "newsbox" on our new page. Set width: 600px to the width of your notice box in the Thor patcher. We then load the content of your news from the URL "http://www.YOURRO.net #newscontent". Set the URL to wherever your news are displayed on your site, but keep #newscontent. Of course, this only works if you have a div on this page with the ID newscontent. 4. So we will wrap a div with the ID newscontent around your news table. Go to the page where your news are displayed and place <div id="newscontent"> at the beginning and </div> at the end. 5. Go back to news.html and link to the stylesheet you wanna use. Replace href="style.css" with e.g. "../themes/default/css/flux.css" if you are using the default theme of FluxCP. You can also create a new style.css file in this folder and style the page yourself. This way you have more control over how exactly it should look in that small notice box within the patcher. 6. Change the URL for the notice box in Thor's config.ini to 'http://www.YOURRO.net/patchernews/news.html' Let me know if it works. A very good effort! However, Thor's built-in web functionality is based on an old version of Internet Explorer which throws a hissy-fit when javascript is used. @Ryoma27 If you want to stick with the built-in news feature for FluxCP, I suggest using PHP & SQL queries to extract and display the data. Or post on the FluxCP Github Issues page and request for an RSS feature 1 Link to comment Share on other sites More sharing options...
Question
Ryoma27
hello, please help how to configure thor patcher showing my news page in built in news in fluxcp?
Link to comment
Share on other sites
4 answers to this question
Recommended Posts