This suggestion was originally here.
At the moment, if on viewing a list of quizzes within a category and new quiz(zes) has been added, the "new quiz" icon is shown.
It would be excellent if the "new posts" image on forum index could be included on the "Select category" page so users can see that one category (or more) contain new quizzes. If no new quiz within a category then you see "no new posts" image. Or, if possible, custom UQM "new quiz/no new quiz" images. I could create these if demand calls for this.
UQM - How to add "new quiz" icon for Category view page
Moderator: CricketMX Forum Moderators
Try this quahappy, let me know if it works. Don't forget to purge cache afterwards
OPEN quiz.php
FIND
AFTER ADD
FIND
AFTER ADD
OPEN styles/prosilver/template/quiz_body.html
FIND
IN LINE FIND
BEFORE ADD
Let me know how that goes
OPEN quiz.php
FIND
Code: Select all
$quiz_count_quiz_num = find_number_of_quiz_in_category($quiz_category_id);
Code: Select all
$new_quiz_sql = 'SELECT COUNT(quiz_id) AS qct FROM ' . QUIZ_TABLE . '
WHERE quiz_category = ' . $quiz_category_id . '
AND quiz_date > ' . $user->data['user_lastvisit'];
$new_quiz_result = $db->sql_query($new_quiz_sql);
$new_quiz_row = $db->sql_fetchrow($new_quiz_result);
$new_quiz_login = ($new_quiz_row['qct'] > 0) ? $user->img('icon_topic_newest', 'VIEW_NEWEST_POST') . ' ' : '';
$db->sql_freeresult($new_quiz_result);
Code: Select all
$template->assign_block_vars('category_row', array(
'CAT_LINK' => $quiz_category_link,
'CAT_NAME' => $quiz_category_name,
Code: Select all
'CAT_NEW_QUIZ' => $new_quiz_login,
FIND
Code: Select all
<dt><label for="keywords"><a href="{category_row.CAT_LINK}">{category_row.CAT_NAME}</a></label>
Code: Select all
{category_row.CAT_NAME}
Code: Select all
{category_row.CAT_NEW_QUIZ}
CricketMX.com in 2022: Still the home of bat's, rat's and other farmyard animals!
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
"OK, life [as you chose to define it] repeats until there are no more lessons to be learned." - nrnoble (June 12, 2005)
"the new forum looks awesome, it's getting bigger & better" - p2p-sharing-rules (11 Jan, 2008)
"Looks like CMX is not only getting bigger...but, also getting better!!" - moongirl (14 Dec, 2007)
- quahappy
- Happy, not Quappy
- Posts: 2266
- Joined: Fri Oct 10, 2008 8:56 pm
- Location: South Yorkshire, UK
Yep. It works.
Only thing I notice is when all new quiz(zes) has been played, the {category_row.CAT_NEW_QUIZ} image still shows and only disappears if you log out and back in again unless of course new quizzes has been added since.
Only thing I notice is when all new quiz(zes) has been played, the {category_row.CAT_NEW_QUIZ} image still shows and only disappears if you log out and back in again unless of course new quizzes has been added since.
If you don't ask...