vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   FAQ Edit v3 (https://vborg.vbsupport.ru/showthread.php?t=27733)

bira 12-30-2001 04:34 PM

Kevin you have a serious mistake in your code, which is why no one here manages to parse HTML:

dohtml is $entry[dohtml] in your code. BUT YOU NEVER SELECTED IT :D

Code:

$entries=$DB_site->query("SELECT entryid,title,text FROM faqentries WHERE faqid='$page' ORDER BY showorder");
should be

Code:

$entries=$DB_site->query("SELECT * FROM faqentries WHERE faqid='$page' ORDER BY showorder");
(in misc.php)

Cheers,

Bira

Lionel 12-30-2001 04:49 PM

you are the best! :)

Hoffi 12-30-2001 08:36 PM

I changed the following:
  • In every SELCT-Statement in the FAQ-Section from the misc.php I set a Star instead of the different row-names. (Sample: SELECT * FROM faq $sql ORDER BY showorder).
  • I use bbcodeparse2.

So the HTML is parsed Good. The Smilies works too. vbCode works all, insted of the [ url ]. This creates a Link like this:
http://usercp.php/?s=

Have anyone a Idea?

And i have another Problem: The Order can't set from the CP. :stupid:

Wolfgang 01-02-2002 11:01 AM

I have the same Problem: The Order can't set from the CP.

I get the Error:

Warning: Variable passed to each() is not an array or object in
/home/sites/site479/web/forum/admin/faq.php on line 344

Order updated!


HTML, Smilies and vbCode works!

Have anyone a Idea?


THX, wolfgang :)

Lionel 01-02-2002 12:23 PM

keeps the installation as is and make the change in post 81

Hoffi 01-02-2002 12:40 PM

Quote:

Originally posted by Lionel
keeps the installation as is and make the change in post 81
I did it. And the other SQL-Statement too. I wrote it before...

Or should i turn back the others?

Lionel 01-02-2002 12:45 PM

I made no change except for the one by Bira on post 81 and works fine.

Psychdrone 01-03-2002 08:29 PM

err so hey dose this work with 2.2.1?

dotagious 01-03-2002 09:35 PM

I have the same question about it working for 2.2.1

I also would like to know what this actually does. I tried to follow the link to the original hack as to find out, but it blocks me from that forum.

Psychdrone 01-05-2002 03:45 AM

grrrrrr some one!!

bbaddons 01-05-2002 04:06 AM

I have installed this on 2.2.1 and it is working fine along with 13 other hacks.

Arathorn 01-06-2002 11:39 AM

Installed in 2.2.1, and it works fine too. But the instructions in the zip file don't work for 2.2.1? In admin/index.php, instead of following the instructions,

Find:
Quote:

makenavselect("Custom vB Codes","<hr>");
// *************************************************
Add directly below:
Quote:

makenavoption("Add Question","faq.php?s=<?php echo $session[sessionhash]; ?>&action=addquestion","<br>");
makenavoption("Add Group","faq.php?s=<?php echo $session[sessionhash]; ?>&action=addfaq","<br>");
makenavoption("Edit","faq.php?s=<?php echo $session[sessionhash]; ?>&action=modify","<br>");
makenavselect("FAQs","<hr>");
// *************************************************

If I'm wrong, please correct me.

Armage Bedar 01-06-2002 06:41 PM

Find the following in admin/faq.php:
PHP Code:

echo " (Order: <input type=text name=\"order[$faq[faqid]]\" size=3 value=\"$question[showorder]\">) "

Change it to:
PHP Code:

echo " (Order: <input type=text name=\"order[$question[entryid]]\" size=3 value=\"$question[showorder]\">) "

Hope that helps.

Wolfgang 01-06-2002 07:30 PM

@Armage Bedar BIG THX! It's work! :D :D :D

Just now I can Order set from the CP.


Wolfgang

Remi 01-06-2002 09:54 PM

With the old FAQ templates, I was able to use variables like:

$homeurl
$bbtitle
$inboxname
$sentitemsname

with this hack they are not working any more !!

Does any one know how to fix this.

Thanks

Remi 01-08-2002 11:43 PM

Can Some one answer this please

Or at least tell me is it the way the hack works or the variables are not working for me only!!

Thanks

SaintDog 01-10-2002 04:34 AM

I would have to say that is it the way the new hack works, so you can no longer use the variables you used to use with the old hack.

As it seems, there are a few things in the hack that have not yet been fixed, but I am sure they will be fixed as soon as possible.

Again, the reason the variables you probably used do not work anymore is because of the new hack I would think. I did not make the hack so I can not really tell you, but that would be my thoughts on it.

Remi 01-10-2002 12:45 PM

Thank you very much Saint :)

I hope some hacker now can tell us how to use variable in this wounderfull hack

mvigod 01-12-2002 03:39 AM

Does this hack only modify the main vb faq or can you make a custom faq for each forum? I have many forums and in each one I want it's own individual topic specific faq. Does this hack do that or edit only the main vb faq???

thanx

marc

Grower 01-12-2002 02:44 PM

I would like to know if anybody is actually working on searchable version of this FAQ hack, so users can search through categories. Let me know because I would like to start working on it. Thank you.

Remi 01-12-2002 04:41 PM

If you are to do any thing, Please make it work with variables, just like the original FAQ. :)

$homeurl
$bbtitle
$inboxname
$sentitemsname

Thanks

Grower 01-16-2002 08:17 PM

In FAQ.PHP around line 292 in addquestion section there is
PHP Code:

makehiddencode("faqid""$faqid"); 

which prevented you from selecting own category for adding question. You have to remove that line to make it work correctly.

Linus 01-26-2002 02:02 PM

I did the hack and it worked fine for me a couple of weeks ago but now the FAQ when clicked upon is empty ... I might have done another hack that might have affected one of the files ... any opinions / advice ???

Linus 01-26-2002 02:13 PM

This is my FAQ bit in the original misc.php

PHP Code:

if ($action=="faq") {
  
$templatesused "faq_title,faq_head,faq_entry";
  include(
"./global.php");

  if(isset(
$page)){$sql "WHERE faqid='$page'";}
  
$query "SELECT faqid,title FROM faq $sql ORDER BY showorder";
  
$faqs=$DB_site->query($query);
  while (
$faq=$DB_site->fetch_array($faqs)) {
    if (isset(
$page))
      {
$title " > <a href='misc.php?s=$session[sessionhash]&action=faq&page=$faq[faqid]'>$faq[title]</a>";
    }
    
$questions=$DB_site->query("SELECT entryid,title,faqid FROM faqentries WHERE faqid='$faq[faqid]' ORDER BY showorder");
    while (
$question=$DB_site->fetch_array($questions)) {
      eval (
"\$faqtitles .= \"".gettemplate("faq_title")."\";");
    }
    eval (
"\$faqhead .= \"".gettemplate("faq_head")."\";");
    unset (
$faqtitles);
  }
  if (isset(
$page)) {
    
$entries=$DB_site->query("SELECT entryid,title,text FROM faqentries WHERE faqid='$page' ORDER BY showorder");
    while(
$entry=$DB_site->fetch_array($entries)){
      
$entry[text] = bbcodeparse2($entry[text],$entry[dohtml],$entry[dobbcode],$entry[dosmilies],$entry[dobbcode]);
      eval (
"\$faqentries .= \"".gettemplate("faq_entry")."\";");
    }
  }
  eval(
"dooutput(\"".gettemplate("faq")."\");");


I'm running v 2.2.1

but then when asked to find
PHP Code:

if ($action=="faq") {
$templatesused ""// Only one template used so load it when called
include("./global.php");
$page intval($page);
if (!
$page)
$page '';
eval(
"dooutput(\"".gettemplate("faq$page")."\");");



I can never find it ?

christina 01-31-2002 04:13 PM

Does this hack work on vb 2.2.2? Just curious as I'm looking to add it. :)

TIA,
Christina

SaintDog 02-03-2002 03:51 AM

FireFly or another person, could you please let me know why I am getting the below error. I have applied the fix provided by Bira as well as the one that another member provided which is supposed to fix the ordering problem, below is the error I get when trying to change the order:

Warning: Variable passed to each() is not an array or object in /path/to/my/forums/admin/faq.php on line 344

slideboxer 02-03-2002 04:29 AM

I was having parsing problems until making the change from post #81.

Problem I'm having now is that the images are not showing up. Anyone have the code fix for this one?

SaintDog 02-03-2002 04:46 AM

The images were not really working for me, I instead went in and instead of using the { images } variable I just used /path/to/image instead.

I need to find a way to correct that error :(

christina 02-03-2002 02:28 PM

Since no one answered about 2.2.2...

I installed it, and there weren't any updates to the admin control panel. If I try to run faq.php directly I get some complaint about "Fatal error: call to undefined function: cpheader() in....path\faq.php on line 13.

Chrirstina

SaintDog 02-03-2002 07:26 PM

You still would have to run the FAQ Install file to update things Christina, I think anyway (since there may be new queries or such added to the db).

I still have not figured out why I get the above error, Can anyone help out on this, I know I can not be the only one getting this, or am I? (I am using 2.2.1)

christina 02-03-2002 11:46 PM

Well, I did run faq_install first, and it showed no errors. It's just that things don't work after having done that...

slideboxer 02-03-2002 11:55 PM

The faq_install itself doesn't make the changes to the control panel. During execution of the install you will receive instructions on what lines of code to modify in your admin/index.php file. This you have to do yourself. I think the install even had some wrong code for this part... here's what I added:

PHP Code:

// ***
makenavoption("Add Question","faq.php?s=<?php echo $session[sessionhash]; ?>&action=addquestion","|");
makenavoption("Add Group","faq.php?s=<?php echo $session[sessionhash]; ?>&action=addfaq");
makenavoption("Edit FAQs","faq.php?s=<?php echo $session[sessionhash]; ?>&action=modify");
makenavselect("FAQs");
// ***

underneath
PHP Code:

makenavoption("Add","announcement.php?action=add","|");
makenavoption("Modify","announcement.php?action=modify");
makenavselect("Announcements"); 


Hope this gets it workiing for you.

christina 02-04-2002 01:58 AM

Ok, don't know how I missed that bit during the install. :/ But, since making the changes, any of the items now in the control panel just give me an "Internal Server Error" and don't provide any more info...

Thanks, btw. :)

Christina

fonzerelli_79 02-04-2002 06:15 AM

the two problems which i found with this code were
1. html not working - apply biras fix on post 81
2. images not working

edit the following faq's :-

under User Maintenance:
What are the buddy and ignore lists?

under : General Board Usage
Can I send email to other members of this board?
What is Private Messaging?

under Reading and Posting Messages :
Can I edit my own posts?

Each of these faq's have to be amended to
Allow HTML in Answer? Yes
Allow smilies in Answer? Yes

Hope this helps
fonz :stoned:

christina 02-04-2002 01:25 PM

Ok, I've gone through and uninstalled, cleaned up the files I was supposed edit, and reinstalled again. But, I always get an internal server error when trying the items in the control panel... :(

Quote:

Originally posted by christina
Ok, don't know how I missed that bit during the install. :/ But, since making the changes, any of the items now in the control panel just give me an "Internal Server Error" and don't provide any more info...

Thanks, btw. :)

Christina


SaintDog 02-04-2002 02:51 PM

Well let's see, you have:

- Run faq_install.php
- Placed faq.php in your /admin/ directory
- Applied the updates from Bira
- Fixed what Fonz brought up

I am not sure why in the world you are getting an internal server error. It does not make too much sense on why you are getting it unless something other than the above have been modified on accident.

Where is Sinecure when you really! need him ;) - I am sure he could help both of us out.

SaintDog 02-04-2002 02:54 PM

You could use the below in the Admin CP, I am not sure what difference it would make, but you do not have to have the "echo" commands in the URL, it deals with the newer versions of vBulletin:

Code:

makenavoption("Edit","faq.php?s=$session[sessionhash]&action=modify","<br>");
makenavoption("Add Group","faq.php?s=$session[sessionhash]&action=addfaq","<br>");
makenavoption("Add Question","faq.php?s=$session[sessionhash]&action=addquestion","<br>");
makenavselect("F.A.Q. Editor");

Just a suggestion

slideboxer 02-04-2002 02:59 PM

The edit of the faq properties worked for me, thanks Fonz.

fonzerelli_79 02-04-2002 06:04 PM

no problem slideboxer ;)

christina 02-04-2002 06:15 PM

Thanks for the information, again.

It still doesn't work here, I've no idea why. :( I think I'm doing things right. I ended up redoing some things and made a faq.php that just calls my faq templates for me instead since I couldn't get this to work...

Christina
Quote:

Originally posted by SaintDog
Well let's see, you have:

- Run faq_install.php
- Placed faq.php in your /admin/ directory
- Applied the updates from Bira
- Fixed what Fonz brought up

I am not sure why in the world you are getting an internal server error. It does not make too much sense on why you are getting it unless something other than the above have been modified on accident.

Where is Sinecure when you really! need him ;) - I am sure he could help both of us out.



All times are GMT. The time now is 04:19 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01578 seconds
  • Memory Usage 1,855KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (7)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete