Dropdown menu field
insanetek 0
From: -
From: -
Notice
This topic is archived. New comments cannot be posted and votes cannot be cast.Responses to this topic
1 Re: Dropdown menu field
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Dropdown menu field
Yes, but you need to add a function in template review_header that get the pages list from the database:
Add after:
the following code:
Now, you can add everywhere in the HTML part of this template the dropdown menu:
This is in template review_overview_header.
A tip: Take a look at the source code of your website. You find there all template names as comment outs.
Is it possible to have more than one dropdown menu on the same page? I tried it but the one outside of the "Table of Contents" is blank.
Yes, but you need to add a function in template review_header that get the pages list from the database:
Add after:
<?php
global $insert;
the following code:
$dropdown = "";
$pages = DBQuery("SELECT review_pagesub, review_page FROM esselbach_st_review WHERE review_id='$insert[review_id]'");
while(list($subject,$page) = mysql_fetch_row($pages))
{
if ($subject)
{
$dropdown .= "<option value="review.php?id=$insert[review_id]&page=$page">$page - $subject";
}
}
Now, you can add everywhere in the HTML part of this template the dropdown menu:
<form>
<select name="url" size="1" OnChange="location.href=form.url.options[form.url.selectedIndex].value" class="smallform_input">
$dropdown
</select>
</form>
Also, how can I remove the "Table of Contents" altogether? (It doesn't fit with my design)
This is in template review_overview_header.
A tip: Take a look at the source code of your website. You find there all template names as comment outs.
1 Re: Dropdown menu field
insanetek
OP
0
From: -
From: -
Dropdown menu field
Is it possible to have more than one dropdown menu on the same page? I tried it but the one outside of the "Table of Contents" is blank. Also, how can I remove the "Table of Contents" altogether? (It doesn't fit with my design)
Is it possible to have more than one dropdown menu on the same page? I tried it but the one outside of the "Table of Contents" is blank. Also, how can I remove the "Table of Contents" altogether? (It doesn't fit with my design)
1 Re: Dropdown menu field
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Dropdown menu field
Fixed. There was a white space character after $EST_TEMPLATE = <<TEMPLATE in two templates.
Fixed. There was a white space character after $EST_TEMPLATE = <<TEMPLATE in two templates.
1 Re: Dropdown menu field
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Dropdown menu field
Originally posted by insanetek:
Please send me a private message with the location of your installation and I will look into it tomorrow.
Originally posted by insanetek:
Yes, this is possible with a small modification in review.php
Find:
and add:
Originally posted by insanetek:
I gave it a try but whenever I add page subjects to more than one page the review page is blank from the review text and the right sidebar to the footer.
Please send me a private message with the location of your installation and I will look into it tomorrow.
Originally posted by insanetek:
Also is there a way to make the extra fields on the first review page be consistent with the other pages from the same review?
Yes, this is possible with a small modification in review.php
Find:
if ($ads)
{
$insert[download_text] = DoAds($insert[download_text]);
}
and add:
$query = DBQuery("SELECT review_extra1, review_extra2, review_extra3, review_extra4, review_extra5, review_extra6, review_extra7, review_extra8, review_extra9, review_extra10, review_extra11, review_extra12, review_extra13, review_extra14, review_extra15, review_extra16, review_extra17, review_extra18, review_extra19, review_extra20 FROM esselbach_st_review WHERE review_id = '$id' AND review_page = '1'");
list($insert['review_extra1'], $insert['review_extra2'], $insert['review_extra3'], $insert['review_extra4'], $insert['review_extra5'], $insert['review_extra6'], $insert['review_extra7'], $insert['review_extra8'], $insert['review_extra9'], $insert['review_extra10'], $insert['review_extra11'], $insert['review_extra12'], $insert['review_extra13'], $insert['review_extra14'], $insert['review_extra15'], $insert['review_extra16'], $insert['review_extra17'], $insert['review_extra18'], $insert['review_extra19'], $insert['review_extra20']) = mysql_fetch_row($query);
1 Re: Dropdown menu field
insanetek
OP
0
From: -
From: -
Dropdown menu field
Also is there a way to make the extra fields on the first review page be consistent with the other pages from the same review?
Also is there a way to make the extra fields on the first review page be consistent with the other pages from the same review?
1 Re: Dropdown menu field
insanetek
OP
0
From: -
From: -
Dropdown menu field
I gave it a try but whenever I add page subjects to more than one page the review page is blank from the review text and the right sidebar to the footer.
I gave it a try but whenever I add page subjects to more than one page the review page is blank from the review text and the right sidebar to the footer.
1 Re: Dropdown menu field
insanetek
OP
0
From: -
From: -
Dropdown menu field
Thanks! I'll give it a try
Thanks! I'll give it a try
1 Re: Dropdown menu field
Philipp
From: Vienna, Austria
Administrator
1340From: Vienna, Austria
Dropdown menu field
The easiest way to doing this is using the review_overview_* templates
review_overview_header
review_overview_list
review_overview_footer
To set the title of each review page: Review => Add or Edit => Page Subject (optional)
The easiest way to doing this is using the review_overview_* templates
review_overview_header
<?php
global $insert;
$EST_TEMPLATE = <<<TEMPLATE
<!-- Template review_overview_header -->
<div align="center">
<font face="Verdana" size="2" color="#000000">Page Index: </font><form>
<select name="url" size="1" OnChange="location.href=form.url.options[form.url.selectedIndex].value" class="smallform_input">
TEMPLATE;
?>
review_overview_list
<?php
global $insert;
$EST_TEMPLATE = <<<TEMPLATE
<!-- Template review_overview_list -->
<option value="review.php?id=$insert[review_id]&page=$insert[review_pageid]">$insert[review_pageid] - $insert[review_pagesubject]
TEMPLATE;
?>
review_overview_footer
<?php
global $insert;
$EST_TEMPLATE = <<<TEMPLATE
<!-- Template review_overview_footer -->
</select>
</form>
</div>
TEMPLATE;
?>
To set the title of each review page: Review => Add or Edit => Page Subject (optional)
When I make a new dropdown menu field and go to input the things that I want in the field on the review editing page all I get is a blank dropdown menu with no editable fields. Is there something else that I need to do?
I want to use the dropdown box as a page index like I currently have here: http://www.insanetek.com/index.php?page=thermalrightv1_1