[BETA] Style Select

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
gzqbyr
Registered User
Posts: 92
Joined: Wed Jan 14, 2004 11:27 pm
Location: Formosa - Taiwan
Contact:

Post by gzqbyr »

  1. Update to 1.0.3a. Please download from my first topic.
    Featutres:
  2. Add Latest News
  3. Add Change Style
Demo: http://mail.dhjh.tcc.edu.tw/~gzqbyr/Hestia/ ( Change Style )
User avatar
alsakrah
Registered User
Posts: 166
Joined: Wed Dec 04, 2002 7:54 pm
Contact:

Post by alsakrah »

very cool

you are the best :wink:

the mod is downloading ....................!
Xpert
Translator
Posts: 114
Joined: Fri Feb 20, 2004 8:19 pm
Location: Moscow, Russia
Contact:

Post by Xpert »

interesting mod, will check it...
gzqbyr
Registered User
Posts: 92
Joined: Wed Jan 14, 2004 11:27 pm
Location: Formosa - Taiwan
Contact:

Post by gzqbyr »

Xpert wrote: interesting mod, will check it...
Thank your check.
User avatar
alsakrah
Registered User
Posts: 166
Joined: Wed Dec 04, 2002 7:54 pm
Contact:

Post by alsakrah »

So I would like to submit some suggestion for this mod (I mean for the new release if there)

When I viewing the style from the dropdown list it is changed to the same style with keeping the select style in the header and it is very great but also the link will not change even when I change the style name the link still remain same

What I mean (there is an example to get my point)

If I visit you demo select style on
http://mail.dhjh.tcc.edu.tw/~gzqbyr/sty ... _style.php

Then I change the style from the selection drop down list the link will remain same like this
http://mail.dhjh.tcc.edu.tw/~gzqbyr/sty ... _style.php
Even I select all the styles
So what about making the link show the styles numbers like
For example : FI Subsilver Shadow is the first installed style so the link will shows like this

http://mail.dhjh.tcc.edu.tw/~gzqbyr/sty ... tyle.php=1

And then the FI Apple style is the 2td installed style so the link will shows like this

http://mail.dhjh.tcc.edu.tw/~gzqbyr/sty ... tyle.php=2

So it will be very easy if I submit a new style and I want to show the example for it I just need to copy it link and past it for example when I type this link
http://mail.dhjh.tcc.edu.tw/~gzqbyr/sty ... tyle.php=2

So direct will view the FI Apple and not FI Subsilver Shadow because FI Subsilver Shadow it is the first one

I hope my post is clear to you

Thank you
gzqbyr
Registered User
Posts: 92
Joined: Wed Jan 14, 2004 11:27 pm
Location: Formosa - Taiwan
Contact:

Post by gzqbyr »

  • If install change mod, please donn't use select_style.php
  • Style ID displayed. Please download again. Overwrite admin_styles_select.php, styles_select_body.tpl.
    Go to Administration Panel
    Styles Admin -> Style select manage
  • the FI Apple style is the 2td installed style

    Edit select_style.php,
    replace

    Code: Select all

    	$sql = "SELECT themes_id, style_name
    		FROM " . THEMES_TABLE . "
    		ORDER BY style_name";
    with

    Code: Select all

    	$sql = "SELECT themes_id, style_name
    		FROM " . THEMES_TABLE . "
    		ORDER BY themes_id";
User avatar
alsakrah
Registered User
Posts: 166
Joined: Wed Dec 04, 2002 7:54 pm
Contact:

Post by alsakrah »

Thank you

So I hope it will work 8O

thank you
DaMysterious
Registered User
Posts: 58
Joined: Mon Sep 09, 2002 7:51 am
Location: The Netherlands
Contact:

Disable random feature

Post by DaMysterious »

Is it possible to disable the random feature and how to do?
DaMysterious.
lover
I've Been Banned!
Posts: 46
Joined: Thu Sep 02, 2004 11:14 pm

Post by lover »

Is there n e way to take off the download feature.
gzqbyr
Registered User
Posts: 92
Joined: Wed Jan 14, 2004 11:27 pm
Location: Formosa - Taiwan
Contact:

Re: Disable random feature

Post by gzqbyr »

DaMysterious wrote: Is it possible to disable the random feature and how to do?

edit select_style.php
replace

Code: Select all

	else
	{
		//
		// Choose style at random
		//
		$sql = "SELECT themes_id
			FROM " . THEMES_TABLE;
		if(!$result = $db->sql_query($sql))
		{
			message_die(GENERAL_ERROR, "Could not query themes table!", "", __LINE__, __FILE__, $sql);
		}
		$style_row = array();
		$I = 0;
		while( $row = $db->sql_fetchrow($result) )
		{
			$I++;
			$style_row[$I] = $row['themes_id'];
		}
		
		list($usec, $sec) = explode(' ', microtime());
		srand((float) $sec + ((float) $usec * 100000));
		$style = $style_row[rand(1, $I)];
	}
with

Code: Select all

	elseif ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_style']) )
	{
		// start with last used style
		$style = $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_style'];
	}
	else
	{
		// default: subSilver
		$style = $theme['themes_id'];
	}
gzqbyr
Registered User
Posts: 92
Joined: Wed Jan 14, 2004 11:27 pm
Location: Formosa - Taiwan
Contact:

Post by gzqbyr »

lover wrote: Is there n e way to take off the download feature.

Sorry! I don't know your mean.
DaMysterious
Registered User
Posts: 58
Joined: Mon Sep 09, 2002 7:51 am
Location: The Netherlands
Contact:

Post by DaMysterious »

@gzqbyr

Thank's for your help, works fine.

While playing around I did add a style counter to select_style.php to suite my needs.

Below the code I like to share.

search in select_style.php

Code: Select all

			$tmp = "<a href=select_style.$phpEx?".DL_LOCAL."=". $style ." target=\"_blank\">".$lang['Style_select_loaclurl']."</a>";	
		}
	}
Add below

Code: Select all

	//
	// Count available styles
	//
	$sql = "SELECT count(*) AS count FROM " . THEMES_TABLE; 
	if( !($result = $db->sql_query($sql)) ) 
	{ 
	  message_die(GENERAL_ERROR, 'Could not obtain style count ', '', __LINE__, __FILE__, $sql); 
	} 
	$style_total = $db->sql_fetchrow($result); 
	$style_total = $style_total['count']; 
Search for

Code: Select all

		'S_SELECT_STYLE' => $select_theme,
Add below

Code: Select all

	// Count available styles
		'L_STYLE_TOTAL' => $lang['Style_total'] .$style_total,
Search in lang_english/lang_main.php your Style Select definitions and add into this section

Code: Select all

$lang['Style_total']= 'Available styles: '; 
In styles_navigate.tpl
Search for

Code: Select all

				<!-- BEGIN dlurl -->
				<tr><td nowrap="nowrap">{L_STYLE_DLURL}</td></tr>
And replace by

Code: Select all

				<tr><td nowrap="nowrap">{L_STYLE_TOTAL}</td></tr>
				<!-- BEGIN dlurl -->
				<tr><td nowrap="nowrap">{L_STYLE_DLURL}</td></tr>
DaMysterious.
gzqbyr
Registered User
Posts: 92
Joined: Wed Jan 14, 2004 11:27 pm
Location: Formosa - Taiwan
Contact:

Post by gzqbyr »

Update to 1.0.4

Demo 1: Click Here
Demo 2: Click Here
Demo 3: Click Here ( Change Style )

It is more interesting between Demo 2 and Demo 3.

Please download from first topic.
User avatar
alsakrah
Registered User
Posts: 166
Joined: Wed Dec 04, 2002 7:54 pm
Contact:

Post by alsakrah »

Very nice

Thank you and well done

========== TESTING NOW ============
gzqbyr
Registered User
Posts: 92
Joined: Wed Jan 14, 2004 11:27 pm
Location: Formosa - Taiwan
Contact:

Post by gzqbyr »

alsakrah wrote: Very nice

Thank you and well done

========== TESTING NOW ============


Thank to your test!
Post Reply

Return to “[2.0.x] MODs in Development”