Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
  #91  
Old 07-31-2002, 07:29 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Logician

ok I see your problem: Use conditional in this format:

[[($bbuserinfo[usergroupid]==1)]]

Of course closing conditional will be replaced too:
[[/($bbuserinfo[usergroupid]==1)]]

That seems to allow the code to show up! Now that I have it so a member can login, how can I get it to return them to the site page, not the forums page?

Also, I'm still having problems with the "Welcome Back ....." as no matter if a member is logged in or out - it still says unregistered and displays the Unregistered name. However, the "My control Panel" link is working. :s

Oh the frustrations! *hehe* This is a great addition/hack, Logician. I really do hope it works out well as it seems to be so far, minus the few tricks here and there.

You've mentioned how with queries it is endless, which is why a list of helpful queries hasn't been posted. However, I've only seen one that has shared so far (the last ten posts). I'm interested in doing more with this hack, but I can't write my own queries just yet. Is there any plans to release some basics to choose from so we can modify them to fit? Suggestions and such?
Reply With Quote
  #92  
Old 08-01-2002, 07:10 AM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Rose
That seems to allow the code to show up! Now that I have it so a member can login, how can I get it to return them to the site page, not the forums page?
Do you need your member to login first before she can display the page? Then why dont you simply use [cantsee]1[/cantsee] tag inside your webtemplate? I guess this will do the trick for you: if she is unregistered/unloggedin she'll get "not allowed" (together with login) page and if she is registered/loggedin she can view the template. What do u think about this solution?

Quote:
Also, I'm still having problems with the "Welcome Back ....." as no matter if a member is logged in or out - it still says unregistered and displays the Unregistered name.
Your format seems correct. Are you sure you are visiting the template after you logged in? Maybe you can create a member account for me in your site (pls pm username and password and template name to me) and let me check it..

Quote:
You've mentioned how with queries it is endless, which is why a list of helpful queries hasn't been posted. However, I've only seen one that has shared so far (the last ten posts). I'm interested in doing more with this hack, but I can't write my own queries just yet. Is there any plans to release some basics to choose from so we can modify them to fit?
The problem is I dont have time for all: I develop the new version, I give support for the hack and I have many other released hacks which I also give support. Yes it would be nice if some basic webquery samples would be released (for which this thread is created) but it would be nicer if some of the hack users who can do it would share theirs for all of us instead of waiting me to do everything.

I'm hoping that this problem would be solved in the new version to a certain extent. I integrated "download webquery/webtemplate" feature into the new version and with one click you would be able to create a text file with how to install installations of your webtemplates and webqueries. So all you have to do is to attach this file in a reply in this thread. Therefore I'm hoping that sharing traffic would get higher after this release. Hopefully..
Reply With Quote
  #93  
Old 08-01-2002, 01:06 PM
Rose's Avatar
Rose Rose is offline
 
Join Date: Nov 2001
Location: K-Town, Germany
Posts: 619
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Logician
Do you need your member to login first before she can display the page? Then why dont you simply use [cantsee]1[/cantsee] tag inside your webtemplate? I guess this will do the trick for you: if she is unregistered/unloggedin she'll get "not allowed" (together with login) page and if she is registered/loggedin she can view the template. What do u think about this solution?
I think I'll try it and see if it works! Will edit this post afterwards.
Edited to say: - Okay. I've added the cansee/cantsee bit. Now it takes me to login. Making progress. However, when I login, it calls for /site/member.php (when obviously it's in the /forums directory). I can't copy member.php to the site folder because that doesn't work, either. How do I get it to call from the forums directory (I thought I had that done).

Quote:
Your format seems correct. Are you sure you are visiting the template after you logged in? Maybe you can create a member account for me in your site (pls pm username and password and template name to me) and let me check it..
I'm sure I'm logged into the forums. I'm not sure if I'm logged into the website - I would assume they both use the same stuff, though. I'll pm you specifics as soon as I can with pass/user.


Quote:
The problem is I dont have time for all: I develop the new version, I give support for the hack and I have many other released hacks which I also give support. Yes it would be nice if some basic webquery samples would be released (for which this thread is created) but it would be nicer if some of the hack users who can do it would share theirs for all of us instead of waiting me to do everything.

I'm hoping that this problem would be solved in the new version to a certain extent. I integrated "download webquery/webtemplate" feature into the new version and with one click you would be able to create a text file with how to install installations of your webtemplates and webqueries. So all you have to do is to attach this file in a reply in this thread. Therefore I'm hoping that sharing traffic would get higher after this release. Hopefully..
I understand. I guess I shall start taking a more proactive stance here, start writing a few things and seeing if they work, and then contribute! That will be on my todo list. *nods* And your plans for the next release sounds grand.
Reply With Quote
  #94  
Old 02-23-2003, 04:26 PM
Craigr's Avatar
Craigr Craigr is offline
 
Join Date: May 2002
Location: Ayr, Scotland
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anybody want to share some more queries?

Craig
Reply With Quote
  #95  
Old 03-30-2003, 03:55 PM
Craigr's Avatar
Craigr Craigr is offline
 
Join Date: May 2002
Location: Ayr, Scotland
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

Is there any way someone could write a query that i could use in the templates.

I want a query that extracts the last 5 posts from a thread and displays part of it say the first few hundred characters. If possible also displays the posters name and time posted.

I managed to alter Pluh News to do this, but you can't include php files in Webtemplates.

Thanks
Craig
Reply With Quote
  #96  
Old 03-30-2003, 06:18 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 07:55 PM Craigr said this in Post #95
I want a query that extracts the last 5 posts from a thread and displays part of it say the first few hundred characters. If possible also displays the posters name and time posted.
here you go:
Attached Files
File Type: txt wq-_5postsfromthread.txt (1.1 KB, 28 views)
Reply With Quote
  #97  
Old 03-30-2003, 06:40 PM
Craigr's Avatar
Craigr Craigr is offline
 
Join Date: May 2002
Location: Ayr, Scotland
Posts: 194
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Today at 08:18 PM Logician said this in Post #96

here you go:
Works great.

Thanks once again.
Craig
Reply With Quote
  #98  
Old 04-22-2003, 03:05 PM
amykhar's Avatar
amykhar amykhar is offline
 
Join Date: Oct 2001
Location: PA
Posts: 4,438
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I threw this together to satisfy my own curiousity. (Thanks to zzed for a tip that helped me do this).

It's not really a finished hack. It's more of a rough job that lets me see what I want to see. As the table grows, I will manually drop older information as needed.

Run this query:
SQL-query : [Edit] [Create PHP Code]
CREATE TABLE `Google` (
`googleid` TINYINT NOT NULL AUTO_INCREMENT,
`url` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `googleid` )
);


In global.php Find:

Code:
$header='';
$footer='';
Add After :
Code:
if(strstr($url, "google")) {
   $DB_site->query("INSERT INTO Google VALUES (null, '$url')");
}

OK. Now for the Web Templates part:

Create a new query:

Query name: _google
Query: Select url from Google;
Description: Figure out what people are searching for on Google
No result Text: none
Table Row:<li><a href="??url??">??url??</a></li>


Create a new Web Template:
Template name: Google
Page Count: 0
(You will need to tweak this to your taste. I kept mine bare bones and allow anyone who knows about it to see it) Template:
[cansee]everybody[/cansee]
[options]templatequeryon[/options]
<ol>
$_google
</ol>

Demo:
http://www.eaforums.com/forums/show.php?pg=test

Have fun
Reply With Quote
  #99  
Old 04-22-2003, 07:14 PM
Logician's Avatar
Logician Logician is offline
 
Join Date: Nov 2001
Location: inside vb code
Posts: 4,449
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

it is handy, thx for sharing!
Reply With Quote
  #100  
Old 05-21-2003, 02:48 PM
mzbcarper mzbcarper is offline
 
Join Date: Mar 2003
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, i want to include the username on my custom page, how could i manage this ?

greez

mzbcarper
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:26 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.03016 seconds
  • Memory Usage 2,289KB
  • Queries Executed 14 (?)
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
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (9)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (1)postbit_attachment
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • postbit_attachment
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete