We hope you enjoy your visit.

You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.


Join our community!


If you're already a member please log in to your account to access all of our features:

Username:   Password:
Locked Topic
  • Pages:
  • 1
[ ! ] Read-Only Unread
Topic Started: Jan 11 2015, 02:23 PM (768 Views)
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Test board
Zeta

I tried doing this myself but can't figure out how to tell if a forum has unread topics or not. So here I am.
Can anybody make me a code that will allow usage of a "Read-Only Unread" forum marker? Kinda self explanatory, I just want that icon to display if there is an unread topic/reply in a read-only forum.

EDIT: Also I'd like it to switch to the read icon when clicked like normal icons do.
Edited by Kankuro, Jan 13 2015, 12:20 AM.
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
That would be a really cool thing to have. That was on my list to ask for too. I wondered if we could have a "View new content" button that would take you to a page that had all the newest posts.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Genosplace
Jan 13 2015, 10:08 AM
That would be a really cool thing to have. That was on my list to ask for too. I wondered if we could have a "View new content" button that would take you to a page that had all the newest posts.
That already exists in 2 places

All content on the board: http://SERVER.zetaboards.com/BOARD_NAME/stats/feed
New Posts: http://SERVER.zetaboards.com/BOARD_NAME/search/?c=5

Change SERVER to your server number and BOARD_NAME to your board name
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
Thanks Kankuro. I changed what you said and put that address into the browser and they came up.

Now here's where I show that I don't know what I'm doing. How do I get that to work by clicking a button on the board?

Sorry I don't know very much. :doh:
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Genosplace
Jan 14 2015, 09:14 AM
Thanks Kankuro. I changed what you said and put that address into the browser and they came up.

Now here's where I show that I don't know what I'm doing. How do I get that to work by clicking a button on the board?

Sorry I don't know very much. :doh:
Add it to the submenu would be the best option in my opinion.

Remove links: http://support.zathyus.com/topic/5196281/
Add links: http://support.zathyus.com/topic/5192198/1/
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
Thanks again. :up: Got it on and working.

One last question. What's the difference in the 2 links, other than layout they look pretty much the same to me.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Genosplace
Jan 14 2015, 01:52 PM
Thanks again. :up: Got it on and working.

One last question. What's the difference in the 2 links, other than layout they look pretty much the same to me.
1 removes links and the other adds them. Hence "Remove Links" and "Add Links"
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Will require AJAX. With that being said, how many read-only forums do you have or you plan to have?
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Just 1.
Offline Profile Goto Top
 
Genosplace
Member Avatar
Member
[ *  * ]
Kankuro
Jan 14 2015, 08:56 PM
Genosplace
Jan 14 2015, 01:52 PM
Thanks again. :up: Got it on and working.

One last question. What's the difference in the 2 links, other than layout they look pretty much the same to me.
1 removes links and the other adds them. Hence "Remove Links" and "Add Links"
I should really pay more attention. :facepalm:

Thanks for helping me get it all worked out Kankuro! :up:
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Try this:
Code:
 
<script type="text/javascript">
$(function() {
var nIMG = 'IMAGE_URL';

$('td.c_mark img[alt="Read-only Forum"]').each(function() {
var fURL = $(this).parent('td.c_mark').next('td.c_forum').find('> strong a').attr('href');
$.get(fURL + '?force_ads', function(data) {
if ($('img[alt="Regular"], img[alt="Hot Topic"], img[alt="Poll"]', data).length > 0) {
$('td.c_forum > strong a[href="' + fURL + '"]').parents('td.c_forum').prev('td.c_mark').find('img').attr('src', nIMG);
}
});
});
});
</script>
Change IMAGE_URL as necessary to the unread read-only forum icon.

A few notes:

  • Will require an AJAX request for each read-only forum you have.
  • The unread 'Topic Status Icons' and the 'Read-only Forum' marker will need to have the default alt text that ZetaBoards provides them, otherwise changes to the script will be required.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Didn't work. And idk what the default are..it's my main board (On my postbit to the left) if you care to check.
They seem to have the default alt tags, but this still doesn't work.

Topic Icons: http://prntscr.com/5tmbxv
Forum Marker: http://prntscr.com/5tmccl

Does it check within Sub Forums within the read only forum? If not then that is what I need. Here is my layout
-Read-Only Forum

--Sub Forum
---Sub-sub forum (I add more and more to this one so there won't be a set number)

--Sub Forum
---Sub-Sub Forum
---Sub-Sub Forum

--Sub Forum
Edited by Kankuro, Jan 17 2015, 01:06 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
Code:
 
if ($('img[alt="Regular"], img[alt="Hot Topic"], img[alt="Poll"]', data).length > 0) {
Change that to this:
Code:
 
if ($('img[alt="Regular Forum"]', data).length > 0) {
I believe that should do the trick.
Offline Profile Goto Top
 
Kankuro
Member Avatar
かんくろ
[ *  *  *  *  * ]
Worked, thank you.

EDIT: can you make it mark the forum as read when clicked like the default read/unread forums do?
Edited by Kankuro, Jan 17 2015, 11:41 PM.
Offline Profile Goto Top
 
Cory
Member Avatar
Member
[ *  *  *  *  *  *  *  *  * ]
I know how to make it change to the read marker and use local storage to save the change when clicked, but I'm not sure how to undo that when there is new replies. I suppose I could save the latest date a topic was posted in, but I'd have to setup a whole array of functions to know when that date has changed. It seems too complex of a change for a simple thing a lot of people probably don't even bother with. Someone else is free to make the addition if they know a good way to do it.
Offline Profile Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
Go to Next Page
« Previous Topic · Closed Requests · Next Topic »
Locked Topic
  • Pages:
  • 1