Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Possible to see shout_id=x

Asked Modified Viewed 2,528 times
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
asked
Veteran Member

Is it possible to see/access eg;

/infusions/shoutbox_panel/shoutbox_archive.php?shout_id=x

- where x is the shout_id eg; 32
0 replies

9 posts

D
DrunkeN
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
answered
Member

Quote

smokeman wrote:

Is it possible to see/access eg;

/infusions/shoutbox_panel/shoutbox_archive.php?shout_id=x

- where x is the shout_id eg; 32


Hi. How do you mean ? Do you want to show the message / author name / date etc if enter
/infusions/shoutbox_panel/shoutbox_archive.php?shout_id=x ?


/Robin
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Yes - cause Im trying to make it so we can search in Shouts. But Im a bit stucked here.. Try to see on my site here: http://www.phpfusion-tips.dk/search.p...p;chars=50

When searching in Shouts it wont show the correct results. Now it only show the newest Shouts in the shoutbox_archive.

If I/we could get it to show only that exactly Shout (or on that page that Shout is - eg; in a range of 10 Shouts).

You understand me ?
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

add to db query
WHERE shout_id = 'X'

PS X must be secured also.
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Thanks. But if I add:
[bcolor=#66ffcc]AND s.shout_id='".$_GET['shout_id']."'[/bcolor]
- to the query in the shoutbox_archive.php:

$result = dbquery(
"SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, u.user_id, u.user_name, u.user_status
FROM ".DB_SHOUTBOX." s
LEFT JOIN ".DB_USERS." u ON s.shout_name=u.user_id
WHERE s.shout_hidden='0' [bcolor=#66ffcc]AND s.shout_id='".$_GET['shout_id']."'[/bcolor]
ORDER BY s.shout_datestamp DESC LIMIT ".$_GET['rowstart'].",20"
);

- then It is working when I have searched and will see/click on the result. But then the shoutbox_archive don't work when accessing it from the link "Shoutbox Archive" in the Shoutbox it self.

Sorry for not putting code in bbcode but the bbcode don't work when using colors...

See here: http://www.phpfusion-tips.dk/search.p...p;chars=50
- we have searched for the word "download" in Shouts. When we click on any search-result and will access the result it's working:
http://www.phpfusion-tips.dk/infusion...t_id=10227

But then when we click on the link "Shoutbox Archive" from the Shoutbox itself to see the Shoutbox Archive it ain't working:
http://www.phpfusion-tips.dk/infusion...rchive.php

Maybe a code that does:

If (we came from search results) {
the modded query including AND s.shout_id='".$_GET['shout_id']."'
} else {
then the standard query
}

??
Edited by smokeman on 04-12-2012 15:17,
0 replies
J
JoiNNN
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums
answered
Veteran Member

In shoutbox_archive.php search
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart'])) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$result = dbquery(
"SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, u.user_id, u.user_name, u.user_status
FROM ".DB_SHOUTBOX." s
LEFT JOIN ".DB_USERS." u ON s.shout_name=u.user_id
WHERE s.shout_hidden='0'
ORDER BY s.shout_datestamp DESC LIMIT ".$_GET['rowstart'].",20"
);[/syntaxhighlighter]
replace with
[syntaxhighlighter brush=php,first-line=1,highlight=0,collapse=false,html-script=false]if (!isset($_GET['rowstart']) || !isnum($_GET['rowstart']) || $_GET['rowstart'] > $rows) { $_GET['rowstart'] = 0; }
if ($rows != 0) {
$and = "";
if ((isset($_GET['shout_id']) && isnum($_GET['shout_id'])) && !isset($_GET['action']) && $_GET['rowstart'] == 0) {
$and = "AND s.shout_id='".$_GET['shout_id']."'";
}
$result = dbquery(
"SELECT s.shout_id, s.shout_name, s.shout_message, s.shout_datestamp, u.user_id, u.user_name, u.user_status
FROM ".DB_SHOUTBOX." s
LEFT JOIN ".DB_USERS." u ON s.shout_name=u.user_id
WHERE s.shout_hidden='0' ".$and."
ORDER BY s.shout_datestamp DESC LIMIT ".$_GET['rowstart'].",20"
);[/syntaxhighlighter]
If you don't know what's with the first line see this.
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Thank you very much JoiNNN. Unfortunately my pc (I thought at least) died the day before yesterday- I have bought all hardware to it brandnew for just 4 months ago - so I brought it to repair to the dealer yesterday. Now I borrowed a pc - and the problem is stille the same.. Now I just figured out that it was the monitor that died. Anyway Im right now on a borrowed pc + monitor and won't install FTP-programs and so on to this pc. I get back on my own pc tomorrow again - end then I will look at this/your code.

Thank you very much for the code so far. :G

Im back tomorrow again. :)
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Yeah JoiNNN - that's exactly what I needed! :D

Thumbs up m8 - very nice. :G

Now I can get the files packed and release it.

I'll give both you and Craig a credit/text for helping me on the rigth way.

Thanks a lot.

Do you have a website/URL btw ? Just so I can throw a link to your site besides your name in the credit ?
0 replies
J
JoiNNN
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums
answered
Veteran Member

No need to add my credits smokeman, is enough that my post was useful ;).
0 replies
S
smokeman
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
answered
Veteran Member

Ok - but I wrote it anyway that you and Craig helped me a bit. ;)

You can see the result of it here:
http://www.php-fusion.co.uk/forum/vie...ost_175169

And a live example here:
http://www.phpfusion-tips.dk/search.php
- "Replikker" means Shouts in Danish.
0 replies

Category Forum

General Discussion

Labels

None yet

Statistics

  • Views 0 views
  • Posts 9 posts
  • Votes 0 votes
  • Topic users 4 members

4 participants

S
S
  • Veteran Member, joined since
  • Contributed 920 posts on the community forums.
  • Started 79 threads in the forums
  • Started this discussions
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
D
D
  • Member, joined since
  • Contributed 161 posts on the community forums.
  • Started 18 threads in the forums
J
J
JoiNNN 10
  • Veteran Member, joined since
  • Contributed 850 posts on the community forums.
  • Started 100 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet