PhpBB Random Quote

Miscaleneous modifications from Stoker
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Random Quote

Post 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);
				}
Board rules! No PM support
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

PhpBB Random Quote

Post 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.
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

PhpBB Random Quote

Post 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>
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Random Quote

Post by Stoker »

It is possible with a script like the one used in top stats.
Board rules! No PM support
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

PhpBB Random Quote

Post 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.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Random Quote

Post 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.
Board rules! No PM support
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

PhpBB Random Quote

Post by Martin_K »

Thanks, I'll try that.
User avatar
Martin_K
BBCoder III
BBCoder III
Posts: 121
Joined: 02 Sep 2011, 11:13
BBCodes: 10
Favourite BBCode: textarea
Favourite MOD: Newsletter Add on
Location: London, UK
Contact:

PhpBB Random Quote

Post 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.
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Random Quote

Post by Stoker »

:thumb:
Board rules! No PM support
User avatar
Stoker
Site Admin
Site Admin
Posts: 3521
Joined: 12 May 2008, 23:26
BBCodes: 239
Favourite BBCode: Anipro
Favourite MOD: PrettyPhoto
Location: Denmark
Contact:

PhpBB Random Quote

Post by Stoker »

When are you going to share the addon Martin? ;)
Also please pm me a demo.
Board rules! No PM support
Locked