Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
dropdown for icons Details »»
dropdown for icons
Version: , by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 09-19-2002 Last Update: Never Installs: 0
 
No support by the author.

ok, the posticons() function doesnt need to be modified, so this is considered more like a template mod...
here it is what i want to do:

i modified forumdisplay.php so it can act in certain forum id's as a news forum and list the content of the first post only beside the thread title.
i also use a customized set of icons for that specific forum (i hacked the vb options to list an array there, so is easy to set whatever forums you want to display the news articles).
when it comes to post a new thread i use a iif condition to select the correct forum array so the newthread.php file displays correctly the right set of icons.

now, i need a little piece of java code to display the news icons in a dropdown menu, in newthread template.
while selecting the dropdown, on the right side it will display the image, so if i have 285 icons for my news, it will not make it look like 5 pages long the newthread.php (like the way it is now).

i really like the idea so i was wondering if kier or anyone else good with jave could help me on this matter.
i searched the web for a relevant piece of code, but we need to keep the iconid values not the iconpaths, to display correctly the selection. so is a little more complicated.

any help will be greatly apreciated.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 09-20-2002, 05:24 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

problem fixed.. thanks to chen the wise arse.
sorry guys, the code is removed... hihi
Reply With Quote
  #3  
Old 09-20-2002, 06:05 PM
Velocd's Avatar
Velocd Velocd is offline
 
Join Date: Mar 2002
Location: CA University
Posts: 1,696
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm not sure if you still need help, but in my vBmoods hack when selecting a mood smiliey from the drop down menu, it displays it on the right. Is that what you mean? I'm not sure what you meant by pages though..like, if it has a lot of elements I'm not sure how you can avoid making it look like a very long list..
Reply With Quote
  #4  
Old 09-21-2002, 03:11 AM
Neo's Avatar
Neo Neo is offline
 
Join Date: Oct 2001
Location: Anywhere
Posts: 1,817
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
<html>
<
body>

<
script langauge='javascript'>
<!--
                              
function 
showavimage(theURL) {                                     
  
document.images.showimage.src=theURL+document.creator.imagelist.options[document.creator.imagelist.selectedIndex].value;
}
                                  
//-->
</script>
                
<
form action="script.php" method="POST" name="creator">

<
select name='imagelist'  onchange="showaimage('http://www.link.com/images/')">
  <
option value='01.gif'>01</option>
  <
option value='02.gif'>02</option>
  <
option value='03.gif'>03</option>
</
select>

<
img src="http://www.link.com/images/default.gif" name="showimage" width="70" height="70" border="0" hspace="15">
   
</
form>
        
</
body>
</
html
Reply With Quote
  #5  
Old 09-21-2002, 07:26 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's the exact HTML you got? You can use the title attribute and assign the image the src from that.
Reply With Quote
  #6  
Old 09-21-2002, 07:58 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this:
Code:
<option value="[high]$icon[iconid]" title="[/high]$icon[iconpath]"$iconselected>$icon[title]</option>
Code:
<tr>
<td bgcolor="#13486D" valign="top"><normalfont><b>Message Icon:</b></normalfont></td>
<td bgcolor="#13486D"><smallfont><select size="10" name="selicon" onchange="document.images.iconpic.src = this[this.selectedIndex].[high]title[/high];">
$posticonbits
</select> <img border="0" src="https://vborg.vbsupport.ru/images/clear.gif" name="iconpic" align="absmiddle"></smallfont></td>
</tr>
Reply With Quote
  #7  
Old 09-21-2002, 08:00 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What you did, only the other way around.
Reply With Quote
  #8  
Old 09-21-2002, 08:38 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Shouldn't $selicon be global inside the function?
Reply With Quote
  #9  
Old 09-21-2002, 08:52 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the problem we are fighting with is this chen:
the values are called in the <select> not in the <option>...
so that's why it cant see the option to assign the "selected".. i dont think there is a way arround..
it's not the end of the world after all there are no icons for replies so is no need to be checked in the database for values.
let me know what you think.
Reply With Quote
  #10  
Old 09-21-2002, 09:03 AM
Admin's Avatar
Admin Admin is offline
Coder
 
Join Date: Oct 2023
Location: Server
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What's the problem? Icons are not pre-selected? Where? Which should be selected?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:01 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07552 seconds
  • Memory Usage 2,306KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete