Page 2 of 3

PhpBB Random Quote

Posted: 27 Feb 2013, 14:44
by Stoker
Open includes/acp/acp_quotes_quotes.php
Find and delete:

Code: Select all

// Same goes for the author
				if (!$quotes_author)
				{
					trigger_error($user->lang['NO_QUOTES_AUTHOR'] . adm_back_link($this->u_action . '&action=add'), E_USER_WARNING);
				}

PhpBB Random Quote

Posted: 27 Feb 2013, 14:48
by Martin_K
Thanks Stoker, quick as ever.

For long quotes it would be good if the quotes box was a set size, and had scrolling built in. Would need height, overflow and word-wrap properties set in css, I think.

I'm looking forwards to the 'close box' button being included as a 'contribution', though should be able to work this out myself.

PhpBB Random Quote

Posted: 27 Feb 2013, 16:49
by Martin_K
Don't mean to be a pain (not really), but would it be possible to put in a navigation bar, for visitors to navigate through the quotes, rather than just having them appear on page (re)load. It may be more useful to my forum to do this, as many of the topics require registration to see, but I would like visitors to be able to see some selected quotes from posts on the forum, and to have a large number of them, they can navigate through would be a real boon.

For the scrolling box of fixed height, I have added the following at the bottom of common.css:

Code: Select all

.quote_text { 
width:auto; 
height:161px; 
padding:10px; 
padding-bottom:0px;
overflow-y: auto !important;
word-wrap: break-word;
}

.quote_text p {
font-size: 1.1em !important;}
and removed the inline css from randomquote_body.html added class quote_text

to give this:

Code: Select all

<div class="content quote_text">
			<!-- IF quotes.QUOTES_TEXT --><p>&ldquo;{quotes.QUOTES_TEXT}&rdquo;</p><!-- ENDIF -->
			</div>

PhpBB Random Quote

Posted: 27 Feb 2013, 17:02
by Stoker
It is possible with a script like the one used in top stats.

PhpBB Random Quote

Posted: 04 Mar 2013, 20:18
by Martin_K
Thanks for the info. I installed bxslider jquery, set to Slidehow using adaptiveHeight, moved the left and right controls down and gave them a higher z-index, to give the following rough and ready quotes page:
jquery bxslider with Random Quote to add navigation
jquery bxslider with Random Quote to add navigation
Not sure how to get something like this on my Board Index, and how much it would slow Board Index down, as I want this page to be reasonably quick to load.

There's a few rough edges in my unfinished work (graphics/css) but a slideshow with navigation makes a potentially useful addition to your mod, even if just on the quotes page.

PhpBB Random Quote

Posted: 04 Mar 2013, 20:27
by Stoker
You need to display all quotes on index to make it work?

Within the index.php code find:

Code: Select all

$result = $db->sql_query_limit($sql, 1);
Change the number 1 to the number of quotes you want to display.

PhpBB Random Quote

Posted: 04 Mar 2013, 20:29
by Martin_K
Thanks, I'll try that.

PhpBB Random Quote

Posted: 05 Mar 2013, 13:50
by Martin_K
Thanks Stoker, that's all I needed, that one line. Now works fine on Board Index. Thinking now there is no need for a separate quotes page, as the visitor can get all the quotes from the Board Index. Happy to share all my edits to get it to work with bxslider, if anyone wants to try it. For demo please PM me.

PhpBB Random Quote

Posted: 05 Mar 2013, 13:58
by Stoker
:thumb:

PhpBB Random Quote

Posted: 08 Mar 2013, 18:55
by Stoker
When are you going to share the addon Martin? ;)
Also please pm me a demo.