Jump to content

AAlice

Members
  • Posts

    2
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

AAlice's Achievements

Poring

Poring (1/15)

  • Week One Done
  • One Month Later
  • One Year In

Recent Badges

1

Reputation

  1. 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.
  2. 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.
×
×
  • Create New...